Hi,
I'm trying to output fields other than those used for grouping/keys in an aggregator stage. I'm using this stage to find the maximum value of one field.
Is this possible?
ex: Max on 4th field; keys are 1st and 2nd fields
input:
123,a,asdf,45,ghk
123,a,ghg,55,dbd
234,b,olkd,90,gjsl
234,b,tklo,60,mnrf
output:
123,a,ghg,55,dbd
234,b,olkd,90,gjsl
Thanks
How can I output fields not grouped in aggregator?
Moderators: chulett, rschirm, roy
Try this link for explanation of issues and possible solutions: viewtopic.php?p=435197
However, your example doesn't seem to need an aggregator. In the example provided you can sort on the two keys and the fourth field and then eliminate duplicates on the first two keys, keeping the record that contains the maximum value in the fourth field (either first or last duplicate depending on sort order).
However, your example doesn't seem to need an aggregator. In the example provided you can sort on the two keys and the fourth field and then eliminate duplicates on the first two keys, keeping the record that contains the maximum value in the fourth field (either first or last duplicate depending on sort order).