Source Table:
Col 1 | Col 2 | Col 3 |
A | B | C |
L | M | N |
A | B | C |
O | P | Q |
O | P | Q |
X | Y | Z |
Target Table 1 (Duplicate Records):
Col 1 | Col 2 | Col 3 |
A | B | C |
O | P | Q |
Target Table 2 (Distinct Records):
Col 1 | Col 2 | Col 3 |
L | M | N |
X | Y | Z |
Solution:
Step 1: Drag the source to mapping and connect it to an aggregator transformation.
Step 2: In aggregator transformation, group by the key column and add a new port call it count_rec to count the key column.
Step 3: Connect a router to the aggregator from the previous step. In router make two groups one named "Distinct" and another as "Duplicate"
In Distint write count_rec=1 and in Duplicate write count_rec>1.
The picture below depicting group name and the filter conditions
Step 4: Connect two groups to corresponding target table.
Ur's Hari
If you like this post, please share it by clicking on g+1 Button.
No comments:
Post a Comment