Aggregate columns based on the condition

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
Vino_joe84
Participant
Posts: 28
Joined: Mon Nov 06, 2006 5:44 am
Location: chennai

Aggregate columns based on the condition

Post by Vino_joe84 »

Hi,

Help us to implement the logic. My Input records is in below.

ID name Sal Dept Status
10 vin 1000 eee d
200 kiui 1000 cs e
300 AV 152 cs d
300 hfajs 600 cs e
400 afd 900 eee f
500 afd 800 cs f

My output should be like this
D_Status_Sal E_status_Sal F_Status_Sal eee_Dept_sal cs_Dept_sal
1152 1600 1700 1900 2552

We tried to use the stage variable in the transformer and use the aggregator. It is not giving the required output.

Please let us know what needs to be done.
J.Ithayavino
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Group by Status summing Sal, then vertical pivot.
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