Page 1 of 1

Using an Aggregator stage to calculate Year to date values

Posted: Mon Jul 07, 2008 4:08 am
by CharlesNagy
I Have incoming data sorted by YearMonth, eg YYYYMM, then BusinessUnit, InvGroup & InvItemGroup, which is aggregated to give a monthly total in the following job structure:

Oracle Read ---- Transformer ------ Aggregator -------Transformer

I now need to populate a new field, YTD, with cumulative monthly totals eg:

MONTH MTD YTD
200801 10 10
200802 20 30
200803 30 60
etc

Does anybody have a nice elegant solution? Actually, just a solution would do.... I have searched the database but haven't found anything obviously pertinent.... :roll:

Thanks

Posted: Mon Jul 07, 2008 4:55 am
by ray.wurlod
Accumulate cumulative total in the Transformer stage (using stage variables) downstream of the Aggregator stage.

Posted: Mon Jul 07, 2008 5:03 am
by CharlesNagy
ray.wurlod wrote:Accumulate cumulative total in the Transformer stage (using stage variables) downstream of the Aggregator stage.
Thanks Ray, I thought about doing that, but I thought I would just check if there was a feature in the Aggregator I was missing....

Posted: Mon Jul 07, 2008 3:00 pm
by ray.wurlod
Don't believe there is. Happy to learn of course.