Page 1 of 1

SORT stage does not fulfill the sort requirements for remove

Posted: Tue Jul 26, 2011 5:10 am
by nishantrk
First of all ..yes..have read the previous posts on this...

My question here is what should I do if I need to sort it on 3 key ,to get themy required records as the first record and then remove duplicate only on 2 keys and keep the first record...
and don't get these warning..

Input

xxxx yyyy 1
pppp qqqq 2
xxxx yyyy 2
rrrr ffff 2
rrrr ffff 3
xxxx yyyy 3

required output

xxxx yyyy 1
pppp qqqq 2
rrrr ffff 2

is there any other way to achieve this without using the remove duplicate stage so that I don't get any warning message???

Posted: Tue Jul 26, 2011 6:23 am
by Mike
In your sort stage, partition by the 2 keys defined in your remove duplicates stage, then sort by those 2 keys + the additional third key (i.e. partition by first 2 keys and sort by all 3 keys).

Mike

Posted: Wed Jul 27, 2011 11:13 am
by nishantrk
Mike wrote:In your sort stage, partition by the 2 keys defined in your remove duplicates stage, then sort by those 2 keys + the additional third key (i.e. partition by first 2 keys and sort by all 3 keys).

Mike
Thanks Mike...