Find Last in Group, emit entire row.
Apologies if this is basic, however, the team and I are all learning Data3Sixty at the same time from Lavastorm.
I'm looking to find the last in a group but emit all input columns related to that specific row.
When I attempt to do this using the aggregate node, I'm left with only the Group by column and the newly created output column due to the operation.
Is this easier done using the transform node?
Just to confirm, I want to emit all columns of the "last" row in a group after being sorted by date.
It seems like it should be so simple and I'm sure I'll kick myself when I hear the answer but it sure beats this banging of my head against a wall.
-
Hi Nick,
you can use a Sort node to sort the data on the field containing your date values. Then within a Transform node configure the 'GroupBy' property with the field you used to sort the data. Then configure the ProcessRecords script to only output the record values if it is the last record in each group using the 'node.lastInGroup' built-in variable.
Please sign in to leave a comment.
Comments
2 comments