how to load in to target files

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
4friends
Participant
Posts: 71
Joined: Tue May 01, 2007 12:51 pm
Location: Mumbai

how to load in to target files

Post by 4friends »

i have a reguirement like in a source file data is having duplicates.

i need to store unique data to one target file and duplicates to another file.

how can we implement?
thanks & regards
kk
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Investigate "CreateKeyChageColumn" in Sort stage. It gives a 1 for the first record and 0 for the duplicates. Use a filter on this field to get unique and duplicates in separate files.
Mayur Dongaonkar
Participant
Posts: 20
Joined: Mon Dec 11, 2006 10:57 am
Location: Pune

Post by Mayur Dongaonkar »

Source File ----> Copy Stage -----> Sort Stage ---> Remove dulicate ---> Target File1
|
|
-----------> Sort Stage ---> Agg Stage ---> Filter ( Count > 1 ) ---> Target File12
Mayur Dongaonkar.
Post Reply