Sorter

This node sorts the rows according to user-defined criteria. In the dialog, select the columns according to which the data should be sorted. Also select whether it should be sorted in ascending or descending order. Additionally, provides the option to compare string-compatible columns in alphanumeric instead of lexicographic order, for example "Row2" before "Row10" instead of "Row10" before "Row2".

Options

Sorting
A list of sorting criteria.
  • Column: Sort rows by the values in this column. If you set multiple sorting criteria, the table is sorted by the first criterion. The following criteria are only considered, if the comparison by all previous criteria results in a tie.
  • Order: Specifies the sorting order:
    • Ascending: The smallest or earliest value in the order will appear at the top of the list. For example, for numbers this will sort the values from smallest to largest; for dates this will sort the values from oldest to most recent date.
    • Descending: The largest or latest value in the order will appear at the top of the list. For example, for numbers this will sort the values from largest to smallest; for dates this will sort the values from most recent to oldest date.
  • String comparison: Specifies which type of sorting to apply to the strings:
    • Natural: Natural sort order is applied. Sorts strings by treating the numeric parts of a string as one character. For example, results in sort order “'Row1', 'Row2', 'Row10'”.
    • Lexicographic: Lexicographic sort order is applied. Sorts strings by comparing character-by-character. For example, results in sort order “'Row1', 'Row10', 'Row2'”.
  • Value comparison: Specifies whether string-compatible values (such as date/time values) are compared by their typed value or by their string representation. Sorting by value (type-specific) uses the native data type comparator. This usually matches user expectations.
    • Value (type-specific): Compares values using their native data type comparator, which usually matches user expectations. For example, date/time values are sorted chronologically.
    • String representation (natural): Compares values by their string representation. “Natural sort order” is applied, so sequences of digits are interpreted as one number. For example, results in sort order “'File1.txt', 'File2.txt', 'File100.txt'”. Note that the textual form of non-String values (e.g., date/time values) may not sort in an expected order.
Sort missing values to end of table
If selected, missing values are always placed at the end of the sorted output. This is independent of the sort order, i.e., if sorted in ascending order, they are considered larger than any non-missing value; if sorted in descending order, they are smaller than any non-missing value.
Sort in memory
If selected, the table is sorted in memory which requires more memory but is faster. In case the input table is large and memory is scarce, it is recommended not to check this option.

Input Ports

Icon
Table to be sorted.

Output Ports

Icon
A sorted table.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.