single row spliting into Multiple rows

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
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

single row spliting into Multiple rows

Post by vinsashi »

Hai,
My source data CONTAINS ONLY ONE COLUMN
Column1 COLUMN2
AAA,BBB,CCC TAB1
DDD TAB2
EEE,FFF,GGG,HH,II TAB3

I NEED OUTPUT LIKE
COLUMN1 COULMN2
AAA TAB1
BBB TAB1
CCC TAB1
DDD TAB2
EEE TAB3
FFF TAB3
GGG TAB3
HH TAB3
II TAB3

Thanks in adavance
vinsashi
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Post by DS_SUPPORT »

Did you tried using Pivot Stage?
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

Post by vinsashi »

I have tried with pivot also but not working..
actually what i did
i have taken only one column
Column1
AAA,BBB,CCC
EE,FF
GG,HH,II
just what idid i have loaded into sequntial file here i mentioned record delimeter string as ',' and final delimeter as 'end'
then i am getting correct output
Column1
AAA
BBB
CCC
EE
FF
LIKE THIS
BUT WHEN I AM TAKING TWO COLUMNS
COLUMN1 COLUMN2
AAA,BBB,CCC TAB1
EE,FF TAB2
IN THIS SCENARIO I AM NOT GETTING CORRECT OUTPUT.

THANKS IN ADAVANCE FOR UR REPLY
VIN....
pathipati.ds
Participant
Posts: 3
Joined: Thu Nov 19, 2009 2:50 am

Post by pathipati.ds »

can u try with record delimiter string
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

Post by vinsashi »

Hi Pathipati,
Thanks for ur reply..I have mentioned in the above how i tried.if i have single column its working.if more than 1 column in input its not working..any other idea to solve that one...

Thanks in adavance
vin...
pathipati.ds
Participant
Posts: 3
Joined: Thu Nov 19, 2009 2:50 am

Post by pathipati.ds »

Can u try with record delimiter string=dos format?
Post Reply