How do you load unique records into one target table and duplicate records into a different target table?

 

How do you load unique records into one target table and duplicate records into  a different target table? 


Source Table:

 COL1COL2COL3
abc
xyz
abc
rfu
abc
vfr
vfr

Target Table 1: Table containing all the unique rows

COL1COL2COL3
abc
xyz
rfu
vfr

Target Table 2: Table containing all the duplicate rows

COL1COL2COL3
abc
abc
vfr
  1. Drag the source to mapping and connect it to an aggregator transformation.
    Aggregator-transformation-informatica-interview-questions
  2. In aggregator transformation, group by the key column and add a new port. Call it count_rec to count  the key column.
  3. Connect  a router to the aggregator from the previous step. In router make two groups: one named “original” and another as “duplicate”.
    In original write count_rec=1 and in duplicate write count_rec>1.
    Connect-router-informatica-interview-questionsThe picture below depicts the group name and the filter conditions.
    Filter-conditions-informatica-interview-questionsConnect two groups to corresponding target tables
  4. Target-table-nformatica-interview-questions

 

Post a Comment

0 Comments