Pivoting of Data

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
srai
Participant
Posts: 101
Joined: Wed Feb 09, 2005 10:50 pm

Pivoting of Data

Post by srai »

Hi Team,

We have a typical requirement.
Source data is comming in format-

PA_No AC_NAME AC_NO
123 d1#d2#d3 30#45#75
145 c1#c2#c3 10#20#25

We need to populate in target as

PA_No AC_NAME AC_NO
123 d1 30
123 d2 45
123 d3 75
145 c1 10
145 c2 20
145 c3 30

We need to implement this logic in datastgae.
Any suggestion on this would be great help.

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Parse the source into separate columns using a Column Import or Transformer stage, then pivot using a Pivot Enterprise stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srai
Participant
Posts: 101
Joined: Wed Feb 09, 2005 10:50 pm

Post by srai »

Hi Ray,

I have tried the Column Import option but Its provided the option to seprate only one column. I am not able to seprate more than one column in single job.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Split the data (Copy stage), use two Column Import stages, then Join the streams back together. Or use a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srai
Participant
Posts: 101
Joined: Wed Feb 09, 2005 10:50 pm

Post by srai »

ray.wurlod wrote:Split the data (Copy stage), use two Column Import stages, then Join the streams back together. Or use a Transformer stage. ...

Thanks a lot Ray!!
It worked for me.
Post Reply