Skip to content

Reorder Columns

Transform

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.

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.

An ordered list of column names. The first name in the list becomes the first column on the output; subsequent names follow.

OptionTypeDescriptionDefault
columnsstring[]Column names in the desired order. Unlisted columns are kept and appended.[]

This transform never drops columns. To drop columns, follow with Select Columns.

The export has identifying columns scattered throughout; you want customer_id and email at the front.

Before:

signup_datetierfull_namecustomer_idbalanceemail
2024-03-12proAlice Anderson1042320.50[email protected]
2024-04-01standardBob Brown104345.00[email protected]

Configuration: columns: ["customer_id", "email"].

After:

customer_idemailsignup_datetierfull_namebalance
1042[email protected]2024-03-12proAlice Anderson320.50
1043[email protected]2024-04-01standardBob Brown45.00

You want every column placed explicitly, in a specific order.

Before:

productskupricestock
WidgetW-00112.50200
GadgetG-01425.0080
DoohickeyD-20264.75540

Configuration: columns: ["sku", "product", "stock", "price"].

After:

skuproductstockprice
W-001Widget20012.50
G-014Gadget8025.00
D-2026Doohickey5404.75
  • 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 phone when no row has a phone column 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.
  • 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.