Spliting two colums into two rows

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sansan
Premium Member
Premium Member
Posts: 19
Joined: Fri Jun 20, 2003 4:24 am

Spliting two colums into two rows

Post by sansan »

Hi,

I'm facing some problem of spliting two colums (header, detail) of files into two rows.

Following is my sample records:

Input File is like below:

Header , Details
A, B

I would like to have the Output like:

Header
A
Details
B

Is it possible to get the output like above?

Thanks a lot,
san san
KeithM
Participant
Posts: 61
Joined: Thu Apr 22, 2004 11:34 am
Contact:

Post by KeithM »

You can use the pivot stage to split columns into rows. It has been covered here many times before. Just do a search on 'pivot' or 'horizontal split.'
Keith
dsxdev
Participant
Posts: 92
Joined: Mon Sep 20, 2004 8:37 am

Post by dsxdev »

You can check the RowSPlit Stage in server canvas.
Pivot Stage will convert columns to rows.
Happy DataStaging
martin
Participant
Posts: 67
Joined: Fri Jul 30, 2004 7:19 am
Location: NewJersy

Post by martin »

Yes....U Can Do This


======>TX=====>Pivot=====>Out

Concatnate Transformer[TX] Input Clumns Into One Output Column
TX
(Input) (Output)

col1
col2 "Header" (col1)
col3 col1:col2:col3:col4:col5:col6 (col2)
col4 "Trailer" (col3)
col5
col6

Pivot
(Input) (Output)

col1
col2 col1,col2,col3
col3

Try This GoodLuck
Post Reply