Page 1 of 1

Pivoting of Data

Posted: Wed Jan 19, 2011 1:02 am
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

Posted: Wed Jan 19, 2011 3:36 am
by ray.wurlod
Parse the source into separate columns using a Column Import or Transformer stage, then pivot using a Pivot Enterprise stage.

Posted: Wed Jan 19, 2011 4:46 am
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.

Posted: Wed Jan 19, 2011 3:17 pm
by ray.wurlod
Split the data (Copy stage), use two Column Import stages, then Join the streams back together. Or use a Transformer stage.

Posted: Thu Jan 20, 2011 12:49 am
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.