Vertical Pivot based on conditions

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
clmhwyfe
Premium Member
Premium Member
Posts: 42
Joined: Mon Jun 18, 2012 1:39 pm

Vertical Pivot based on conditions

Post by clmhwyfe »

Hi all,

Am using a vertical pivot , but a new requirement is not working and am not sure on the change.

Initially Data was available as shown below and I was able to do the veritcal pivot as Value_1, Value_2, Value_3

ID SEQ_ID VALUE
1 | 1 | A
1 | 2 | B
1 | 3 | C
2 | 1 | X
2 | 2 | Y

but now they have a new vaue in the SEQ_ID which could be an alphabet (A) and I need to populate column 'Value_Attribute' with the value only if SEQ_ID = 'A' , there are instances where some of the groups dont have a SEQ_ID = 'A' so when i sort the data based on the ID and SEQ_ID , my values are getting interchanged in instances where there are no SEQ_ID = 'A'

Kinldy let me know if we can specify a condition in the Pivot stage to populate the 'VALUE_ATTRIBUTE' only if the SEQ_ID is 'A'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No.

But you can filter beforehand or afterwards.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
clmhwyfe
Premium Member
Premium Member
Posts: 42
Joined: Mon Jun 18, 2012 1:39 pm

Post by clmhwyfe »

Thanks Ray,

I will try to filter it before the Pivot stage and update that column via another process.
Post Reply