Remove duplicate with certain type

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
Oritech
Premium Member
Premium Member
Posts: 140
Joined: Thu May 07, 2009 9:32 pm

Remove duplicate with certain type

Post by Oritech »

I want to remove duplicate ID with type 2,as per below senario


Input


id type
1 1
2 2
3 3
3 2 -> To be removed for duplicate Id = 3
4 3
4 2 -> To be removed for duplicate Id = 4
5 5

output

id type
1 1
2 2
3 3
4 3
5 5

Shall apprciate your help in putting this logic in datastage.
behrouz
Participant
Posts: 41
Joined: Tue Oct 28, 2008 4:13 am

Post by behrouz »

dont have you to find the duplicate first then filter by type

Regards
Arash.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Remove Duplicates stage keyed on "id" retaining the First record from each group.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply