Vertical Pivot

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
chandra.shekhar@tcs.com
Premium Member
Premium Member
Posts: 353
Joined: Mon Jan 17, 2011 5:03 am
Location: Mumbai, India

Vertical Pivot

Post by chandra.shekhar@tcs.com »

Dear Team,

We are facing issue while doing vertical pivoting in datastage .

More description as follows:

Job :

db2 ---> Pivot (vertical pivot) ----->fixedwidth File


job functionality :

We have requirement of below output (after vertical Pivot) .

COL1|COL2|COL3
A|1|1|1
B|2|2|2
C|3|3|3

But if db2 query passes only 2 records only then output is like as follows which is disturbing the order of fixed width file.

COL1|COL2|COL3
A|1|1|1
C|3|3|3

Here the missing line is B|2|2|2


Fixedwidth file output as follows:

1|1|1|3|3|3

but if db2 passes only 2 records then it should give me below expected output .

COL1|COL2|COL3
A|1|1|1
B|0|0|0
C|3|3|3


Expected Fixedwidth file output as follows:

1|1|1|0|0|0|3|3|3

How we can achieve the same ?

Thanks
Thanx and Regards,
ETL User
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

Could you share the requirement in words. Examples are good, but only in conjunction with a requirement description. ;-)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I should have thought TCS would always require an algorithm specification.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

rkashyap wrote:Could you share the requirement in words. Examples are good, but only in conjunction with a requirement description. ;-)
Real examples are good. Made up ones? Not so much.
Last edited by chulett on Tue Jul 26, 2016 6:40 am, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Vertical Pivot

Post by SURA »

I think the code is working as expected. If you have master KEY values, then keep it in a table as a source and left out join the data table (present source) so that you can get the result as expected.

Correct me if i haven't paid enough attention!
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

SURA - almost 1200 posts and you are still quoting entire messages to reply? Please learn to love the Reply to topic button, less for me to clean up that way. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Noted.

Not by intention.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Post Reply