Vertical Pivot in Server Job

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
haryedru
Participant
Posts: 4
Joined: Sat Nov 19, 2011 2:25 am
Location: India

Vertical Pivot in Server Job

Post by haryedru »

Hi
I am looking for a solution to this...

This is my input
ID,COMPANY,LOCATION,PLACE
1,HCL,BANGLORE,MANYATTA
1,HCL,CHENNAI,NAVALUR
1,HCL,HYDERABAD,HITECHCITY
2,IBM,BANGLORE,MADIWALA
2,IBM,CHENNAI,RAMAPURAM

This should be my output
ID,COMPANY,BANGLORE,CHENNAI,HYDERABAD
1,HCL,MANYATTA,NAVALUR,HTTECHCITY
2,IBM,MADIWALA,RAMAPURAM,

I was able to get the output using parallel job using Vertical Pivot, but i am trying to do it using Server Job can anyone tell me a soution for this
Hari
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's still a vertical pivot, it's just that you have no stage to automate that in Server jobs. However, there are techniques (generally involving a transformer and stage variables) that have been documented here quite a number of times. Rather than me typing it all in again, please do an exact search for vertical pivot in the Server forum.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply