Column to row transpose in datastage

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
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Column to row transpose in datastage

Post by soumya5891 »

I have a requirement where I have to transpose records from row to column like the followings.

Input records coming from flat fie as follows

A,B,1,2,3,4,5,6
C,D,1,2,3,4,7,8
E,F,2,5,4,7,8,9

Considering the first two fields are the business key and rest are the different measure value.

Output records will be (let say for the first record split)
A,B,1
A,B,2
A,B,3
A,B,4
A,B,5
A,B,6
like this way for others also.

Will it better in performance perspective to implement in Pivot enterprise stage or in transformer loop.

Considering we are using datastage 8.5
Soumya
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Use transformer looping for complex problems, this is your basic boring pivot so use the Pivot stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Post by soumya5891 »

Thanks a lot for your reply.

I have one file where no of columns are fixed -using Pivot stage

I have one file where no of columns are not fixed - using transformer loop stage
Soumya
Post Reply