aggregator stage (count the no. of rows)

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
s1kaasam
Participant
Posts: 17
Joined: Wed Feb 02, 2005 5:11 pm
Location: virginia

aggregator stage (count the no. of rows)

Post by s1kaasam »

Hi
I have an input of 5 fields to the aggregator stage of which 3 I am using the group by function and 1 field I am suming up the input field to an output field.
Now the remaining one field I would like to count the no. of rows (i.e. have a counter to count the no. of records in the grouping ) that were in the group by clause.I see that I could not use both summation of a field and counting of the rows for another field in the same aggregator stage.

Is it possible to do it in the same aggregator or use another one?
shravan
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Create a dummy column with value 1 and use sum function in the same agg.
Post Reply