Rename Columns
Rename one or more columns by declaring
from→tomappings. Columns not listed in the mappings pass through with their original names. Use it to clean up source headers (e.g.Customer ID→customer_id), align columns to a downstream schema, or apply consistent naming across imported files.
How it works
Section titled “How it works”Rename Columns is a streaming transform: each row is processed independently and emitted with the matching keys swapped to their target names. Row order, row count, and cell values are unchanged — only the keys differ.
The transform builds a Map<from, to> once at startup and rewrites each row’s keys in input order. Columns whose names are not in the mapping are emitted unchanged. Mappings whose from column does not exist on a row are silently ignored for that row.
If no mappings are defined, all rows pass through unchanged.
Input: One tabular data connection. Output: The same rows with the configured columns renamed; other columns untouched.
Options
Section titled “Options”Mappings
Section titled “Mappings”An ordered list of { from, to } pairs. Both fields are required strings; either being empty is a configuration error.
| Field | Type | Description |
|---|---|---|
from | string | Existing column name to rename. Required, non-empty. |
to | string | New column name. Required, non-empty. |
Defaults to an empty list (passthrough).
Examples
Section titled “Examples”Normalize CSV headers to snake_case
Section titled “Normalize CSV headers to snake_case”The source export uses Title Case headers and you want lowercase snake_case for downstream tooling.
Before:
| Customer ID | Full Name | Signup Date |
|---|---|---|
| 1042 | Alice Anderson | 2024-03-12 |
| 1043 | Bob Brown | 2024-04-01 |
| 1044 | Carol Chen | 2025-01-18 |
Configuration: Three mappings — Customer ID → customer_id, Full Name → full_name, Signup Date → signup_date.
After:
| customer_id | full_name | signup_date |
|---|---|---|
| 1042 | Alice Anderson | 2024-03-12 |
| 1043 | Bob Brown | 2024-04-01 |
| 1044 | Carol Chen | 2025-01-18 |
Rename one column, leave others alone
Section titled “Rename one column, leave others alone”Only the email_address column needs to become email; everything else stays as-is.
Before:
| name | email_address | role |
|---|---|---|
| Alice | [email protected] | admin |
| Bob | [email protected] | user |
Configuration: One mapping — email_address → email.
After:
| name | role | |
|---|---|---|
| Alice | [email protected] | admin |
| Bob | [email protected] | user |
Tips and Edge Cases
Section titled “Tips and Edge Cases”- Renaming to a name that already exists collapses the two columns. The transform writes to the target key as it walks the input row in insertion order, so if you rename
legacy_total→totalwhile atotalcolumn already exists, the column written last wins. This is rarely what you want — pair with Select Columns to drop the duplicate first, or rename the existingtotalcolumn to something else as a separate mapping. Seeapps/web/src/transforms/rename-columns/logic.ts:37-44. - Mappings whose source column doesn’t exist on a row are silently ignored. This is intentional — sparse rows (where a column may be absent on some rows) don’t error. The downside is that typos in the
fromfield don’t produce a runtime warning; the rename just never fires.
Related Transforms
Section titled “Related Transforms”- Select Columns — drop the leftover columns after a rename, or remove the duplicate when renaming into an existing name.
- Reorder Columns — change column order without changing names.
- Formula — derive a new column from existing ones if you need more than a name change.