using pivot stage how to do this?

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
jhansi
Participant
Posts: 33
Joined: Sat May 26, 2012 4:56 am

using pivot stage how to do this?

Post by jhansi »

source
c1,c2,n1,n2,n3
abc,eng,john,peter,mike

target
c1,c2,name
abc,eng,john
abc,eng,peter
abc,eng,mike
Last edited by jhansi on Tue Jun 19, 2012 6:46 am, edited 1 time in total.
jhansi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Your example makes absolulely no sense. Please explain to us the rules you have that would allow one to get from your source to your target output samples, then maybe someone could help. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ntr
Participant
Posts: 110
Joined: Fri Dec 18, 2009 10:30 am
Location: pune

Re: using pivot stage how to do this?

Post by ntr »

source----copy------funnel---output

take three links from copy stage

1st link c1,c2,n1(name)

2nd link c1,c2,n2(name)

3rd link c1,c2,n3(name)

after that in funnel stage combine the data and pass to output
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or just use the pivot stage. Now that the example has been corrected, it is a perfectly simple horizontal pivot. And if you are unclear how to do this, read the documentation for the stage, it will walk you thru it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jhansi
Participant
Posts: 33
Joined: Sat May 26, 2012 4:56 am

Re: using pivot stage how to do this?

Post by jhansi »

ntr wrote:source----copy------funnel---output
But funnel stage is showing only 2 columns c1,c2.then how to combine the data? and what is n1(name)?
Last edited by jhansi on Wed Jun 20, 2012 12:07 am, edited 1 time in total.
jhansi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or just use the Pivot stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jhansi
Participant
Posts: 33
Joined: Sat May 26, 2012 4:56 am

Post by jhansi »

i didn't find the Pivot Definition tab of the Stage page as mentioned in parallel job developer guide
jhansi
ntr
Participant
Posts: 110
Joined: Fri Dec 18, 2009 10:30 am
Location: pune

Re: using pivot stage how to do this?

Post by ntr »

as mentioned above change colum n1 as "name", colum n2 as "name", colum

n3 as "name", then funnel will show the c1,c2,name
jhansi
Participant
Posts: 33
Joined: Sat May 26, 2012 4:56 am

Re: using pivot stage how to do this?

Post by jhansi »

thnx ntr.its working
But i am not able to get proper output with pivot stage.
its showing output as
j
p
m
jhansi
ntr
Participant
Posts: 110
Joined: Fri Dec 18, 2009 10:30 am
Location: pune

Re: using pivot stage how to do this?

Post by ntr »

in pivot stage make the "name" field datatype to varchar(50) and map

n1,n2,n3 into it
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You don't need to make the output name field 50, it should match the size of a single input name field. What 8.x version do you have? Are you using the Pivot Enterprise stage?
-craig

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