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
balu536
Premium Member
Posts: 103 Joined: Tue Dec 02, 2008 5:01 am
Post
by balu536 » Wed Aug 05, 2009 10:42 am
Hi all,
I have a requirement of Horizontal pivot i.e c\Columns to Row conversion.The logic to be achieved is explained below
i/p:
ID COL1 COL2 COL3 COL4
1 10 20 30 40
2 11 25 32 15
3 45 56 23 100
Required O/p:
ID CHAR1 CHAR2
1 COL1 10
1 COL2 20
1 COL3 30
1 COL4 40
2 COL1 11
2 COL2 25
2 COL3 32
2 COL4 15
3 COL1 45
3 COL2 56
3 COL3 23
3 COL4 100
Please help me in achieving this output using Pivot Stage.
Regards,
Balakrishna
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Aug 05, 2009 10:45 am
Just talked about something very much like this:
viewtopic.php?t=128627
-craig
"You can never have too many knives" -- Logan Nine Fingers
balu536
Premium Member
Posts: 103 Joined: Tue Dec 02, 2008 5:01 am
Post
by balu536 » Wed Aug 05, 2009 11:09 am
Will any one please explain about using the Output Deviation in Pivot Stage
Regards,
Balakrishna
balu536
Premium Member
Posts: 103 Joined: Tue Dec 02, 2008 5:01 am
Post
by balu536 » Wed Aug 05, 2009 11:12 am
Please neglect my earlier post.
Will any one explain me the logic defined in the above link mentioned.I didn't understand what they meant by using a particular code in Output Column Derivation
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Aug 05, 2009 2:47 pm
You need to add fields to your flow that hard-code your column names and then pivot them along with your data.
-craig
"You can never have too many knives" -- Logan Nine Fingers