aggregator question

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
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

aggregator question

Post by dnat »

Hi,

I am doing rollups from the incoming records.

I have a group based on which i am summing multiple columns and output the same in multiple columns and finding the count. Can we do this using one stage or do we need multiple stages.

Ex:

Col A|Col B|Col C|Col D|Col E
aaaa|bbbbb|1234|3456 |654
aaaa|bbbbb|456 |980 |908

It is grouped based on col A and Col B

The output should be

Col A| Col B| Tot 1|Tot 2| Tot 3|Count
aaaa|bbbbb |1690| 4436| 1562| 2

I need this output for each group. I have nearly 50 columns where i need to do a total.
gssr
Participant
Posts: 243
Joined: Fri Jan 09, 2009 12:51 am
Location: India

Post by gssr »

You can do it in a single aggregator stage for all your calculations
RAJ
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... but you will need a separate Column for Calculation for each calculation - just as you would if you were doing it in SQL or using any other tool.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply