In Aggregator Stage i am passing five input columns A,B,C,D and E.
I am grouping on A,B,C,D keys. After Grouping i want to retain the First Value of E in the group. Is this possible? If possible which aggregate function to use? because in Aggregator stage i did find any specific function to retain the first value.
Aggregator Stage
Moderators: chulett, rschirm, roy
Aggregator Stage
Gaurav.
-
- Participant
- Posts: 78
- Joined: Fri Mar 02, 2007 4:54 am
- Location: CHENNAI
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Sorry I forgot to mention that i have some other columns F,G on which i need to aggregation for SUM and COUNT. And for Column E i need to retain the First value in that group. So I wanted to find if any such function for retaining the FIRST value is present in Aggregator Stage.ray.wurlod wrote:INSTEAD of Aggregator stage. ...
Gaurav.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Changing the specification risks invalidating the answer.
There is no First or Last set function in the parallel Aggregator stage.
Is that clear now?
Your solution will, therefore, require both stage types. Use a "fork join" design; split the stream into two, run one stream through an Aggregator stage and the other stream through a Remove Duplicates stage, then bring both streams back together in a Join stage.
There is no First or Last set function in the parallel Aggregator stage.
Is that clear now?
Your solution will, therefore, require both stage types. Use a "fork join" design; split the stream into two, run one stream through an Aggregator stage and the other stream through a Remove Duplicates stage, then bring both streams back together in a Join 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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.