Saturday, May 12, 2012

Split non-key columns

Description: I have a source table with 3 columns EMPNO, ENAME, LOC. Now I would like to split the source into 2 taget tables based on the primary key EMPNO as one target table contains EMPNO, ENAME and another target table contains EMPNO, LOC as shown below.

MY SOURCE      TARGET_1      TARGET_2
SNo Name Loc
100 Chandu Hyderabad
200 Satish Chennai
300 Siva Noida
400 Srinivas Bengaluru
EmpNo EName
100 Chandu
200 Satish
300 Siva
400 Srinivas
EmpNo EName
100 Hyderabad
200 Chennai
300 Noida
400 Bengaluru
Solution:
  1. Connect all ports from Source transformation to Aggregate transformation.
  2. Connect EMPNO and ENAME ports to one target table.
  3. And connect EMPNO and LOC ports to another target table.
  4. The final mapping looks like as shown below:

3 comments:

Related Posts Plugin for WordPress, Blogger...