All nodes/Data/DataFrame Ops
DF Sort
SQL ORDER BY: sort by one or more columns.
Type in the graph: df_sort
Exec
An error branch can be enabled (expose_error_output) to handle failures on their own path.
Ports can be split into separate execution and data handles.
Try it
Minimal working workflow
- Execute + Data
Runs as pasted
When to use it
Orders the rows of a table — the SQL ORDER BY of the family. Order is not only for reports: it decides which of several identical rows counts as the first one, which is why this node goes before df_drop_duplicates when you want to keep the most recent record, and before writing a file.
How it works
“Sort keys” is a list: each row names a column and its own direction flag. The order of the rows sets the priority — the first key sorts, the second breaks ties inside the first, and so on. The direction is chosen per key; there is no single toggle for the whole node.
The sort is stable: rows whose keys are all equal keep the relative order they arrived in. After sorting, row numbering is rewritten from zero, which matters for a later side-by-side df_concat.
Common mistakes
- No keys at all. The list is required; a graph with an empty one fails validation.
- Expecting the sort to trim the table too. There is no “take the first N” node in the family: limit the row count with df_query or with the “Row limit” field while reading the file (df_read_csv).
- A column with mixed values. If one column holds both numbers and text, the comparison fails and takes the node with it — normalise the values first (df_update).
- Sorting “by date” where the date is text. Such a column sorts as a string, so
2026-08-15and2026-8-9end up in an order you did not expect. Zero-padded formats sort correctly.
Inputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
DataFramedf | Execute + Dataexecute_data | dataframe |
Outputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Successoutput | Execute + Dataexecute_data | dataframe | |
Erroron_error | Execute + Dataexecute_data | — | shown when expose_error_output = true |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
Sort keysby | array | — | Order of priority — first key sorts first. |
Shared fields
Every node has these three — the platform adds them, not the node author.
expose_error_output— When enabled, show an execution output to connect nodes that run if this step fails.split_ports_in— Show separate execution and data input handles instead of one combined port.split_ports_out— Show separate execution and data output handles instead of one combined port.