Reorder Columns
Set the column order by listing the columns you want first. Listed columns appear in the order you specify; any column not in the list is appended at the end in its original input order. Use it to put key columns at the front of an export, mirror a downstream schema, or restore a sensible ordering after upstream transforms left things scrambled.
How it works
Section titled “How it works”Reorder Columns is a streaming transform: each row is rebuilt with keys in the configured order, and columns absent from the list are appended after, preserving their input order. No columns are added or removed — the same set of keys is always emitted; only the order changes.
Listed columns that don’t exist on a row are skipped silently (they don’t create empty cells). Listed columns that do exist are emitted first in the configured order. Unlisted columns are then appended in input order.
If the column list is empty, rows pass through in their original order.
Input: One tabular data connection. Output: The same rows with keys reordered.
Options
Section titled “Options”Columns
Section titled “Columns”An ordered list of column names. The first name in the list becomes the first column on the output; subsequent names follow.
| Option | Type | Description | Default |
|---|---|---|---|
columns | string[] | Column names in the desired order. Unlisted columns are kept and appended. | [] |
This transform never drops columns. To drop columns, follow with Select Columns.
Examples
Section titled “Examples”Move key columns to the front
Section titled “Move key columns to the front”The export has identifying columns scattered throughout; you want customer_id and email at the front.
Before:
| signup_date | tier | full_name | customer_id | balance | |
|---|---|---|---|---|---|
| 2024-03-12 | pro | Alice Anderson | 1042 | 320.50 | [email protected] |
| 2024-04-01 | standard | Bob Brown | 1043 | 45.00 | [email protected] |
Configuration: columns: ["customer_id", "email"].
After:
| customer_id | signup_date | tier | full_name | balance | |
|---|---|---|---|---|---|
| 1042 | [email protected] | 2024-03-12 | pro | Alice Anderson | 320.50 |
| 1043 | [email protected] | 2024-04-01 | standard | Bob Brown | 45.00 |
Fully specify the column order
Section titled “Fully specify the column order”You want every column placed explicitly, in a specific order.
Before:
| product | sku | price | stock |
|---|---|---|---|
| Widget | W-001 | 12.50 | 200 |
| Gadget | G-014 | 25.00 | 80 |
| Doohickey | D-2026 | 4.75 | 540 |
Configuration: columns: ["sku", "product", "stock", "price"].
After:
| sku | product | stock | price |
|---|---|---|---|
| W-001 | Widget | 200 | 12.50 |
| G-014 | Gadget | 80 | 25.00 |
| D-2026 | Doohickey | 540 | 4.75 |
Tips and Edge Cases
Section titled “Tips and Edge Cases”- Unlisted columns are appended, never dropped. Reorder Columns is purely a reshuffle — if you list two of five columns, the other three still come through, appended after the listed two in their input order. To drop columns, follow with Select Columns. See
apps/web/src/transforms/reorder-columns/logic.ts:46-56. - Listed columns that don’t exist on a row are silently skipped. Listing
phonewhen no row has aphonecolumn produces no output column for it — there is no empty cell or null-fill. This is the same forgiving behavior as Select Columns, and means typos go unflagged.
Related Transforms
Section titled “Related Transforms”- Select Columns — drop columns instead of (or after) reordering.
- Rename Columns — change column names without changing order.
- Sort Rows — reorder rows; Reorder Columns reorders columns.