Page 1 of 1

Sort before a Sequential file

Posted: Fri Mar 23, 2012 2:55 pm
by RAJARP
Hi all,
I have got a simple job to review and want to confirm a thing.

Code: Select all

Source 2
 | 
 JOIN-->SORT-->sequential file
 |                                       
Source1
My Understanding:
As the sequential file is not going to maintain the sorting, the 'SORT' stage in front of the seq.file is not required.

Please confirm whether my understanding is correct.

P.S:And also I am very sure that there are no duplicates in either of the sources, so the sort stage is not used to remove duplicates.

Thanks in advance,

Raja R P

Posted: Fri Mar 23, 2012 3:49 pm
by ray.wurlod
If you specify a sort/merge collector on the Sequential File stage input link, it will preserve sorted order.

Posted: Fri Apr 06, 2012 12:01 am
by RAJARP
Hi Ray,

Thanks .

Code: Select all

Source 2 
 | 
 JOIN---->sequential file 
 |                                        
Source1 
Please find that I removed the SORT stage from my earlier design.
Even in this way , we can preserve the sorted order by specifying a sort/merge collector on the Sequential File stage input link,right?


Regards,
Raja R P

Posted: Fri Apr 06, 2012 12:08 am
by ray.wurlod
Try it. Find out.

Posted: Fri Apr 06, 2012 2:03 pm
by RAJARP
I know that's a lame question anyways... :) My apologies

There is no need of sort stage in front of the sequentail file.All it needs is specifying a sort/merge collector on the Sequential File stage input link.It will preserve the Sort.I tried this as well

Thanks,
Raja R P

Posted: Fri Apr 06, 2012 2:55 pm
by qt_ky
I think it's a fine question. Considering that the Join stage requires sorted inputs, I don't think you would need a Sort stage following Join stage to begin with, unless you need to resort based on some other key.