Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: Tim MeagherHi,
It isn't necessary to sort the data first - you can set the "VerifyInputsSorted" parameter in the "Optional" tab of the node to false.
However, in this case, the node will not sort the data, and will simply move to the next group each time the value of the "GroupBy" expression changes.
This may lead to the node producing data that you are not expecting.
If you don't want to create a new Sort node each time, you can use the Agg Ex node - and set the "SortInput" parameter on the "Optional" tab to true.
This is a composite node, containing a Sort node.
This means that the node will still behave exactly the same from a performance perspective as if you added a Sort node then an Agg node yourself, it is really just a convenience so you don't have to create both.
I've attached a graph which contains examples of:
- An Agg node taking unsorted input, with the "VerifyInputsSorted" parameter set to false
- A Sort node followed by an Agg node - taking the same data as above using same script
- An Agg Ex node configured to sort the data itself - taking the same data as above, using the same script
Note that the Agg Ex node only works with one output, so if you need multiple outputs you'll still need to use the Agg node.
Regards,
Tim.
Attachments:
Agg_AggEx.brg