Page 1 of 1

Problem during mapping

Posted: Mon Jul 06, 2009 9:58 am
by Vishal1982
Hi All,
I have some problem during use of Map Designer.
For Ex: I have dimension tables called Employee(Empid,Empname) and Department(DeptID,DeptName) in datawarehouse,one source table which contain columns from Employee and Department as well as additional of it's own.I have target table which is a staging area which contain columns from source table and some boolean value columns.for example(empname_bit,deptname_bit)I want to extract the value into this target columns as either 0 or 1,here the condition is that if Empname of source is exist into the Employee dimension table then value in Empname_bit should be load as 1 and if not then value should be 0,So i wanted to confirm whether we can do this kind of transformation at row level or at DB level in Map Designer.

Thanks in Advance.

..........

Posted: Mon Jul 06, 2009 12:50 pm
by rep
You should be able to handle this.

I used to have a system where;

A nurse fills out a form, including an ID field, and sends the info as a Word Document. A VB program saves it as text file, and my system gets it.

I do a DB look up to a table, DBLOOKUP() , to see if the nurses ID is present. If it is NOT, I check another table. If it IS in the second table, I put it in the first table. This was done all through one map with multiple output cards.

I run an SQL statment against the first table using the "DBLOOKUP()" function, then based on the value returned, I would go against the second table, etc.


It seems this is what you want to do;

IF( DBLOOKUP(SQL STATMENT) > "", 0, 1) (Greater then null)

..........

Posted: Mon Jul 06, 2009 1:53 pm
by rep
You should be able to handle this.

I used to have a system where;

A nurse fills out a form, including an ID field, and sends the info as a Word Document. A VB program saves it as text file, and my system gets it.

I do a DB look up to a table, DBLOOKUP() , to see if the nurses ID is present. If it is NOT, I check another table. If it IS in the second table, I put it in the first table. This was done all through one map with multiple output cards.

I run an SQL statment against the first table using the "DBLOOKUP()" function, then based on the value returned, I would go against the second table, etc.


It seems this is what you want to do;

IF( DBLOOKUP(SQL STATMENT) > "", 0, 1) (Greater then null)