Spliting the data from one coulmn sperated by ,

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
marpadga18
Premium Member
Premium Member
Posts: 96
Joined: Fri Aug 20, 2010 8:51 am

Spliting the data from one coulmn sperated by ,

Post by marpadga18 »

I have oracle table which has like below example in col7 column there will be values seperated , in one column it is kind of horizontal pivoting but the data is in 1 column seprated ,

In near future this col7 and col8 may have some more values
any inputs really helpfull. There is no pipe in the data for clear understanding I kept |

col1| clo2| col3| col4| clo5|col7 | col8
ahy |ahx |axs |aht |azs |LO1,LO2,LO3,LO4 |LH1,LH2,LH3
zas | bsz |dgf |asd |ans |LO5,LO6 |LH7

I need the ouptput like
col1 clo2 col3 col4 clo5 col7 col8
ahy ahx axs aht azs LO1 LH1
ahy ahx axs aht azs LO1 LH2
ahy ahx axs aht azs LO1 LH3
ahy ahx axs aht azs LO2 LH1
ahy ahx axs aht azs LO2 LH2
ahy ahx axs aht azs LO2 LH3
ahy ahx axs aht azs LO3 LH1
ahy ahx axs aht azs LO3 LH2
ahy ahx axs aht azs LO3 LH3
ahy ahx axs aht azs LO4 LH1
ahy ahx axs aht azs LO4 LH2
ahy ahx axs aht azs LO4 LH3
zas bsz dgf asd ans LO5 LH7
zas bsz dgf asd ans LO6 LH7

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

Post by ray.wurlod »

If you have version 8.5 this is a perfect application for the looping capability of the 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.
marpadga18
Premium Member
Premium Member
Posts: 96
Joined: Fri Aug 20, 2010 8:51 am

Post by marpadga18 »

Yes Ray you are right it is 8.5 but this is the first time I am using loop in transformer so any ideas how to start with loop? I saw the syntax in help but don't know how to start. Any ideas if possible?
marpadga18
Premium Member
Premium Member
Posts: 96
Joined: Fri Aug 20, 2010 8:51 am

Post by marpadga18 »

I did this, it is easy to use loop variable. See the below example.

http://publib.boulder.ibm.com/infocente ... mple2.html

folks see this it is so easy good example :):)
Post Reply