Help Centre

Sort Rows

About Sort Rows

This operation sorts all columns in an input file by the values in a single column. Sort direction can be ascending (1–9, A–Z) or descending (9–1, Z–A) and the sort method set to Alphanumeric or Numeric.

Using Sort Rows

To add a Sort Rows operation to your pipeline, open the ‘Add Operation’ popup and select ‘Sort Rows’. Next, select the Sort Column, Sort Direction and Sort Method.


Sort methods

Alphanumeric sorting

Alphanumeric sorting is intended for text strings, so values are sorted by their first character. This means that when sorting the numbers 1 to 100 ascending, the first values will be 1, 10, 100, 11, 12… When sorting values with combined numbers and letters, A1000 would be considered smaller than A999, since the first digit is a 1.

Numeric sorting

Numeric sorting is intended for columns of numbers. When sorting 1 to 100 ascending, the first values will be 1, 2, 3, 4, 5… Values containing text strings will not be sorted.

Stability

The sort algorithms are stable, meaning that if two sort values are identical, their relative order will remain unchanged from the input order.

Sort by multiple columns

To sort by multiple columns, create a sort key column by combining the columns you wish to sort by into a single column. Having a sort key column, rather than sorting by multiple columns, makes it easier to verify that the sort has been applied correctly. The sort key column can be removed later in the pipeline.

Multiple stage inputs

If a stage has multiple inputs, the data will be sorted within each input. If a sort across all inputs is desired, the data should be unioned prior to inputting to the stage.