Need help in generating logic with good performance

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
suri
Participant
Posts: 24
Joined: Tue May 25, 2004 12:17 am
Location: piscataway
Contact:

Need help in generating logic with good performance

Post by suri »

Hello Everyone,
I have below requirement in one of my job, can someone please let me know the efficient way to work on this.
Column1 Column2
123 First
123 Test1
123 Test2
123 Test3

Column1 Column2 Column3
123 First Test3
If only one record with key value then Column3 is null

I thought of using 2 remove duplicate stages to get first and last record with the same key value and then use transform stage to map the column3. I think this effect the performance of the job.
I thought of using Pivot stage also. Is there any better idea, please advice.

Thanks in advance
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Use remove duplicates and Pivot stage. Performance also wont be impacted.
Post Reply