Skip to main content

Order By

Overview

The Order By node sorts a DataFrame by one or more columns. Use it to control the row order of your data before it is exported, used in a report, or passed to a destination node.

Purpose

Use Order By when downstream nodes need records in a predictable sequence, such as newest invoices first, customers sorted by name, or report rows grouped by status and date.

Configuration

Add one or more sort columns by clicking Add Field. For each field, configure:

SettingDescription
FieldThe column from the input DataFrame to sort by
OrderASC (ascending, A to Z, 1 to 9) or DESC (descending, Z to A, 9 to 1)
NullsWhere to place rows where this column's value is null: FIRST (nulls appear before all other values) or LAST (nulls appear after all other values)

When multiple fields are added, sorting is applied in the order they are listed: the first field is the primary sort key, the second is the tie-breaker, and so on.

Inputs

InputData TypeInput TypeDescription
OrderByInputDataDataFrameSingleA DataFrame connected to the OrderByInputData port.

Outputs

OutputData TypeCollectionDescription
OrderByOutputDataDataFrameFalseThe same DataFrame schema with ordering rules attached.

Processing Logic

The node copies the input DataFrame metadata and adds one order rule for each configured sort field. Each rule stores the selected column, direction, and null placement. The actual rows and columns are not changed by the configuration itself.

If no sort fields are configured, the node emits a warning.

Examples

Sort open orders by newest date, then highest amount:

FieldOrderNulls
order_dateDESCLAST
amountDESCLAST

Notes / Limitations

  • The Order By node does not change the data, only the row sequence.
  • If you need to sort and then limit the number of rows, combine Order By with a Query In-Memory node using a LIMIT clause.