sortnode properties
The Sort node sorts records into ascending or descending order based on the values of one or more fields.
Example
node = stream.create("sort", "My node")
node.setPropertyValue("keys", [["Age", "Ascending"], ["Sex", "Descending"]])
node.setPropertyValue("default_ascending", False)
node.setPropertyValue("use_existing_keys", True)
node.setPropertyValue("existing_keys", [["Age", "Ascending"]])
sortnode properties |
Data type | Property description |
---|---|---|
keys
|
list | Specifies the fields you want to sort against. If no direction is specified, the default is used. |
default_ascending
|
flag | Specifies the default sort order. |
use_existing_keys
|
flag | Specifies whether sorting is optimized by using the previous sort order for fields that are already sorted. |
existing_keys
|
Specifies the fields that are already sorted and the direction in which they are sorted. Uses
the same format as the keys property. |
|
default_sort_order
|
Ascending Descending |
Specify whether, by default, records are sorted in ascending or descending order of the sort key values. |