Page 1 of 1

First of, Last of Aggregate Stage

Posted: Tue Jul 13, 2010 1:34 am
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

Posted: Tue Jul 13, 2010 1:39 am
by ray.wurlod
Remove Duplicates stage.

Posted: Tue Jul 13, 2010 1:45 am
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

Posted: Tue Jul 13, 2010 3:32 am
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.

Posted: Tue Jul 13, 2010 4:40 am
by ray.wurlod
Use Copy stage to create the two streams. Use Join stage to rejoin them.