Hi All,
I have source like...
EmpName EmpNo Sal
venu 123 10000
raju 213 20000
venkat 423 30000
O/p i want like this...
EmpName EmpNo Sal
venu 123 10000
raju 213 20000
venkat 423 30000
venu 123 10000
raju 213 20000
venkat 423 30000
How can i get duplicate records in target...
Some times i need to populate only some columns for Ex:
EmpName EmpNo Sal
venu 123 10000
raju 213 20000
venkat 423 30000
venu
raju
venkat
Like this how it is possible....
how to populate duplicate records in target
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 9
- Joined: Sun Jun 27, 2010 11:52 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
The easiest way is to:
The easiest way is to:
- add an artificial key to the data using a Column Generator stage
create a copy of the data stream using a Copy stage
join the two copies using a Join stage (take care to separate column names)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi,
Strange requirement...
There is an alternate way too...
just simply use a copy stage, with entire partition and this will create as many duplicates of you input depending upon you number of nodes in APT Config File. If your APT Config file is of two nodes, this will create 2 records per input... if four nodes, then 4 records and so on...
Strange requirement...
![Wink :wink:](./images/smilies/icon_wink.gif)
There is an alternate way too...
just simply use a copy stage, with entire partition and this will create as many duplicates of you input depending upon you number of nodes in APT Config File. If your APT Config file is of two nodes, this will create 2 records per input... if four nodes, then 4 records and so on...
Regards,
Sunny Sharma.
Sunny Sharma.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 72
- Joined: Wed Dec 12, 2007 2:29 am
hi
you can also get the duplicates using the 'Create Cluster Key Column' Option in Sort Stage. This option set the Cluster Key column value as 1 for first record of each group and remaining records of that group will have Cluster Key Column value as 0. Depending upon your requirement of which records to capture,chose the sorting order as asc or desc.
After Sort Stage,you can put a filter stage to get all records with cluster column value as 0.This way you can capture the duplicates.
Regards
Ulhas
you can also get the duplicates using the 'Create Cluster Key Column' Option in Sort Stage. This option set the Cluster Key column value as 1 for first record of each group and remaining records of that group will have Cluster Key Column value as 0. Depending upon your requirement of which records to capture,chose the sorting order as asc or desc.
After Sort Stage,you can put a filter stage to get all records with cluster column value as 0.This way you can capture the duplicates.
Regards
Ulhas
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: