Aggregator - Group Based Calc

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
senthilt1
Participant
Posts: 134
Joined: Mon Nov 19, 2007 2:17 am

Aggregator - Group Based Calc

Post by senthilt1 »

Hi All,

I want to perform some calculation for each group from aggregator,
For Example,

Input Data:

Col1 Col2
100 abc
100 def
100 ghi
200 oio
200 yui

My Desired Outut is:

Col1 Col2
100 abc:def:ghi
200 oio:yui

Can i achieve this in Aggregator stage itself??

Please help me out...

Thanks,
Senthil p
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Post by ShaneMuir »

Hi Senthil

What you are trying to achieve is called a vertical pivot and it cannot be done with an aggregator stage.

Do a search for 'vertical pivot' within the forum and you should be able to find several detailed solutions.
mahadev.v
Participant
Posts: 111
Joined: Tue May 06, 2008 5:29 am
Location: Bangalore

Post by mahadev.v »

I heard that the pivot stage in V8 can do the vertical pivot. You might want to take a look at that. Or do a search here on "Vertical pivot".
"given enough eyeballs, all bugs are shallow" - Eric S. Raymond
senthilt1
Participant
Posts: 134
Joined: Mon Nov 19, 2007 2:17 am

Post by senthilt1 »

Hi ShaneMuir/Mahadev.v,

Thanks for your Info, I will do a search on Vertical Pivot.

Thanks,

Senthil P
Post Reply