How to Split Row into columns through Data Stage?

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
sprasad55
Participant
Posts: 11
Joined: Thu Dec 28, 2006 4:16 pm

How to Split Row into columns through Data Stage?

Post by sprasad55 »

Can any one suggest me how to split row in to columns through data stage?

E.g
Row:
Column1 Column2 Column3
100 200 300

Into Columns:

Column1 Column2
100 200

Column1 Column3
100 300


Thanks
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Welcome, there are several ways to do that depending on the kind of sourcefile.

for example Pivot-Stage or Hash Table or or or ....

Start searching in the Forum and if you don't find an answer to your problem, please let us know
Wolfgang Hürter
Amsterdam
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yep, as noted several ways. Simplest would be the Pivot stage unless you are working with a huge volume of data as it can be a little... slow.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Pivot stage has its own manual (Pivot.pdf). Read that first, it contains good descriptions and examples.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
georgesebastian
Participant
Posts: 83
Joined: Tue Dec 19, 2006 8:38 am

Post by georgesebastian »

WoMaWil wrote:Welcome, there are several ways to do that depending on the kind of sourcefile.

for example Pivot-Stage or Hash Table or or or ....

Start searching in the Forum and if you don't find an answer to your problem, please let us know
Hi Wolfgang,

By Hash Table do you mean a hash File?If so how can it do the functionality of a Pivot? Can you please explain..

Thanks
George
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why?

A Pivot stage will do exactly what you require.

With a hashed file, the technique for a horizontal pivot is to load the non-pivoting columns in a value mark delimited dynamic array and to UNNEST that when extracting.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
georgesebastian
Participant
Posts: 83
Joined: Tue Dec 19, 2006 8:38 am

Post by georgesebastian »

ray.wurlod wrote:Why?

A Pivot stage will do exactly what you require.

With a hashed file, the technique for a horizontal pivot is to load the non-pivoting columns in a value mark delimited dynamic array and to U ...
Sorry Ray,

I am not a premium member so i was not able to read your posting fully.
Sure i will be a premium member soon

Thanks
George
Post Reply