Using an Aggregator stage to calculate Year to date values

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
CharlesNagy
Premium Member
Premium Member
Posts: 66
Joined: Mon Feb 21, 2005 10:40 am
Location: Paris

Using an Aggregator stage to calculate Year to date values

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Accumulate cumulative total in the Transformer stage (using stage variables) downstream of the Aggregator 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.
CharlesNagy
Premium Member
Premium Member
Posts: 66
Joined: Mon Feb 21, 2005 10:40 am
Location: Paris

Post 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....
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't believe there is. Happy to learn of course.
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