First of, Last of Aggregate 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
myukassign
Premium Member
Premium Member
Posts: 238
Joined: Fri Jul 25, 2008 8:55 am

First of, Last of Aggregate Stage

Post by myukassign »

Hi I am using aggregate stage to do some calculation. I can find that First, Last options are missing in the parellel Aggregate stage which was present in the Server version. Can you tell me to get the equivalent here.

Min and Max is there but in my case my datatype is varchar so it is resulting 0 for me.

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

Post by ray.wurlod »

Remove Duplicates 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.
myukassign
Premium Member
Premium Member
Posts: 238
Joined: Fri Jul 25, 2008 8:55 am

Post by myukassign »

Ray...

In sucha situvation like this

PID Ordercount SalesTeamMember

100 2 John_stigmata
200 7 Luka_orange
100 1 Mary_stigmata

In such a situvation I want just the sum based on PID and pick any of the SalesTeamMember for that group. How can I make use of Remove duplicate...


My output should be...

PID SumOrdercount SalesTeamMemeber
100 3 John_stigmata
200 7 Luka_orange
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

send records to two streams one to Remove Duplicate stage to pick the first/last salesteam member and second to aggregator to get the sum and then join them together on PID.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use Copy stage to create the two streams. Use Join stage to rejoin them.
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