Page 1 of 1

Aggregator stage

Posted: Mon May 07, 2012 12:52 am
by iskapalli
Hi,

I want to sum of more than one input column in same output column by useing Aggregator stage.

ex: select sum(col1+ col2) group by col3.

Please help me.

Re: Aggregator stage

Posted: Mon May 07, 2012 1:06 am
by jerome_rajan
Please post a sample of your data and the expected output. The question is ambigous and not very clear.

Posted: Mon May 07, 2012 2:49 am
by ray.wurlod
Sum them separately then sum the results. You can't do it in a single pass unless you've calculated (col1 + col2) upstream of the Aggregator stage.

Posted: Mon May 07, 2012 6:46 am
by chulett
The latter seems like the best solution to me... sum them first upstream and then Aggregate them.