Aggregator Stage

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
dtatem
Participant
Posts: 54
Joined: Wed Jun 09, 2004 7:50 am

Aggregator Stage

Post by dtatem »

OK,

I am using the aggregator stage and after aggregating the specified column, I want to the other columns to be outputted also, in the output link so I can carry them downstream. Any ideas?

thanks, dtatem
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Same rules as SQL - every input column must either be grouped or have an aggregate function applied.

Think about it - fewer rows out than in, because of grouping. From which input rows would your passthrough columns be selected?

You could create a "fork join" design - split your data into two streams (Copy stage), run one stream through Aggregator, then bring both streams back together in an inner join in a Join stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dtatem
Participant
Posts: 54
Joined: Wed Jun 09, 2004 7:50 am

Post by dtatem »

I forgot to mention something, after the aggregation is done on that input column, I want only one output showing me the Total sum of all rows after the aggregation, plus the other columns from the input data[no aggregation on these columns]

I have create a Groupkey for the aggregation plus the column which is to be aggregated. I guess I would have to join the aggregated value back to the other input rows so I can carry them downstream.

Thanks you all are a BIG help..

--dtatem
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

Yes you guessed it right 8)
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
vijayrc
Participant
Posts: 197
Joined: Sun Apr 02, 2006 10:31 am
Location: NJ

Post by vijayrc »

dtatem wrote:I forgot to mention something, after the aggregation is done on that input column, I want only one output showing me the Total sum of all rows after the aggregation, plus the other columns from the input data[no aggregation on these columns]

I have create a Groupkey for the aggregation plus the column which is to be aggregated. I guess I would have to join the aggregated value back to the other input rows so I can carry them downstream.

Thanks you all are a BIG help..

--dtatem
Other option would be to do the 'aggregation' using a Transformer stage and thereby achieve the same.
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

As Josh said,

You can use a fork and join to get the output what you desire.
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
Post Reply