Page 1 of 1

Column to row transpose in datastage

Posted: Sun Aug 12, 2012 11:22 am
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

Posted: Sun Aug 12, 2012 11:28 am
by chulett
Use transformer looping for complex problems, this is your basic boring pivot so use the Pivot stage.

Posted: Tue Aug 14, 2012 9:46 am
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