Shape / columns · All operations
Choose and rename columns
Keep, drop, reorder or rename columns.
Status
- In arcform
Runs as a SQL step
arcform carries it as a
sql:step today.- Shape of the result
- one row out per row in, with columns added or changed
- Level
- one clause of SQL
The DuckDB step
Drop, rename and pick columns by pattern
It reads the orders table the proofs share. Create it first:
CREATE TABLE orders AS SELECT * FROM (VALUES
(1, 'Alice Ng', 'north', DATE '2026-01-03', 120.00, 'widget', 'a|b', '{"channel":"web","items":[1,2]}'),
(2, 'alice ng', 'north', DATE '2026-01-05', 80.50, 'gadget', 'b', '{"channel":"shop","items":[3]}'),
(3, 'Bob Okafor', 'south', DATE '2026-01-05', 300.00, 'widget', 'a|c', '{"channel":"web","items":[4,5,6]}'),
(4, 'Carla Díaz', 'east', DATE '2026-01-09', NULL, 'gizmo', NULL, '{"channel":"web","items":[]}'),
(5, 'Bob Okafor', 'south', DATE '2026-01-12', 45.25, 'gadget', 'c', '{"channel":"phone","items":[7]}'),
(6, 'Dev Patel', 'west', DATE '2026-01-12', 510.00, 'widget', 'a', '{"channel":"web","items":[8,9]}'),
(7, 'Carla Diaz', 'east', DATE '2026-01-20', 99.99, 'gizmo', 'b|c', '{"channel":"shop","items":[10]}'),
(8, 'Dev Patel', 'west', DATE '2026-02-02', 510.00, 'widget', 'a', '{"channel":"web","items":[8,9]}'),
(9, 'Eve Larsen', NULL, DATE '2026-02-03', 15.00, 'gadget', NULL, '{"channel":"web","items":[11]}'),
(10, 'Alice Ng', 'north', DATE '2026-02-10', 220.00, 'gizmo', 'a|b|c', '{"channel":"phone","items":[12,13]}')
) t(order_id, customer, region, order_date, amount, product, tags, meta);Then run the statement:
CREATE TEMP TABLE result AS
SELECT * EXCLUDE (meta, tags) RENAME (customer AS customer_name) FROM orders;
DESCRIBE result;
SELECT COLUMNS('^order_.*') FROM orders LIMIT 1;
SELECT CASE WHEN ((SELECT list(column_name) = ['order_id', 'customer_name', 'region', 'order_date', 'amount', 'product'] FROM (DESCRIBE result))) THEN 'as expected' ELSE error('the columns are not the six expected, in order') END AS verdict;- It needs nothing installed beyond DuckDB itself.
- The statement checks its own result and raises an error when it is wrong: “the columns are not the six expected, in order”.
- It passed on DuckDB
v2.0.0 (Cyanoptera) d54cbbe3df.
Variants
- Drop empty or constant columns
Drop the columns whose values are all empty, mostly missing or a single repeated value.
- Keep or drop columns
Keep the named columns and drop the rest, or drop the named columns and keep the rest.
- Rename columns
Give chosen columns new names, one by one or from old-name and new-name pairs.
- Reorder columns
Change the order of the columns without changing which columns there are.
- Split columns into two tables
Send the chosen columns to one output table and the remaining columns to a second.
Keep, rename and reorder in one step
Choose, rename, reorder and sometimes retype columns in a single projection.
Pick columns by type, pattern or position
Refer to a set of columns by data type, name pattern or position instead of naming each one.
Match columns to a reference table
Keep, rename or reorder columns to follow the columns or name mapping held in a second table or stored schema.
Rename columns by a rule
Rename many columns at once by a prefix, suffix, case change, pattern replacement or function on the name.
Use a row as column names
Take the values of one or more rows as the column names and remove those rows from the data.
What other tools call it
Meridian's classification; an independent blind rating agreed on 86.2% of 312 rows (exact class, version 2).
Alteryx Designer (4)
Dynamic Renameread 2026-09-27Rename columns by formula, from the first row of data or from a description stream
Dynamic Selectread 2026-09-27Select fields by type or by formula, evaluated at run time
Selectread 2026-09-27Include, exclude, reorder and rename columns, and change their type and size
Select In-DBread 2026-09-27Select, deselect, rename and reorder fields inside the database
Apache DataFusion (10)
ASread 2026-09-27Pipe: alias the input relation, BigQuery-style |> syntax
Projection (SELECT)read 2026-09-27Choose and compute output columns
SELECTread 2026-09-27Pipe: project columns, BigQuery-style |> syntax
Wildcards (EXCLUDE / EXCEPT)read 2026-09-27Select all columns of an input, omitting named ones
aliasread 2026-09-27DataFrame method: Apply an alias to the DataFrame
drop_columnsread 2026-09-27DataFrame method: Drop the named columns
selectread 2026-09-27DataFrame method: Project arbitrary expressions, like a SQL SELECT list
select_columnsread 2026-09-27DataFrame method: Keep only the named columns
select_exprsread 2026-09-27DataFrame method: Project a list of expression strings
with_column_renamedread 2026-09-27DataFrame method: Rename one column
Apache Hop (2)
Select Valuesread 2026-09-27Select, remove, rename and reorder fields, and change their type, length and format
Static Schema Mappingread 2026-09-27Map incoming fields onto the fields of a stored schema definition
Apache NiFi (3)
FilterAttributeread 2026-09-27Keep a named set of FlowFile attributes and drop the rest, or drop the named set
RemoveRecordFieldread 2026-09-27Remove the fields selected by RecordPath from each record
RenameRecordFieldread 2026-09-27Rename the fields selected by RecordPath in each record
Apache SeaTunnel (3)
FieldMapperread 2026-09-27Map input fields to output fields: rename, reorder and drop
FieldRenameread 2026-09-27Rename fields by case conversion, prefix, suffix, regex replacement or specific pairs
Filterread 2026-09-27Keep the listed fields or drop the listed fields; it selects columns, not rows
AWS Glue (12)
ApplyMappingread 2026-09-27Map source fields to target fields, renaming them and changing their types
ChangeSchemaread 2026-09-27Map source keys to target keys: rename them, change their types, drop them
Drop Null Fieldsread 2026-09-27Remove columns whose values are all null
DropFieldsread 2026-09-27Choose the keys to drop
DropFieldsread 2026-09-27Drop the named fields
DropNullFieldsread 2026-09-27Drop fields whose value is missing or null in every record
RenameFieldread 2026-09-27Rename a single key
RenameFieldread 2026-09-27Rename one field
SelectFieldsread 2026-09-27Choose the keys to keep
SelectFieldsread 2026-09-27Keep only the named fields
SplitFieldsread 2026-09-27Split a frame into two by field: the named fields and the remaining fields
SplitFieldsread 2026-09-27Split the keys into two outputs: the selected keys and the remaining keys
Azure Data Factory (3)
Column Managementread 2026-09-27Power Query M functions supported at scale: select, remove, rename and reorder columns
Metafunctionsread 2026-09-2711 functions: byItem, byOrigin, byOrigins, byName, byNames, …
Selectread 2026-09-27Rename columns and streams, and drop or reorder columns
Bruin (1)
Column name mapping (ingestr assets)read 2026-09-27Rename a source column on its way to the destination via source_column
dbt-utils (1)
starread 2026-09-27Emit the column list of a relation with exclusions, alias prefix, prefix/suffix and renames
DuckDB (1)
SELECT (clause)read 2026-09-27Choose, rename and compute columns; * EXCLUDE, REPLACE, RENAME and COLUMNS() act on many at once
Duckle (4)
Drop Columnsread 2026-09-25drop columns with SELECT * EXCLUDE
Project / Selectread 2026-09-25keep chosen columns
Rename Columnsread 2026-09-25rename columns
Reorder Columnsread 2026-09-25reorder columns
EasyMorph (8)
Keep/remove columnsread 2026-09-27Keep or drop selected columns
Label columnsread 2026-09-27Name columns from the values in one or more top rows
Modify column namesread 2026-09-27Add a prefix or suffix to column names
Remove empty columnsread 2026-09-27Drop columns that are entirely empty, whitespace or a single repeated value
Rename columnsread 2026-09-27Give selected columns new names
Rename columns with lookupread 2026-09-27Rename many columns from an old-name to new-name lookup table
Reorder columnsread 2026-09-27Change the order of columns
Select columns by lookupread 2026-09-27Keep the columns named in a lookup table
Ibis (4)
Aliasread 2026-09-27Give an expression its output column name
DropColumnsread 2026-09-27Remove named columns from a relation
Fieldread 2026-09-27Refer to one column of a relation by name
Projectread 2026-09-27Select, compute and name the output columns of a relation
KNIME Analytics Platform (17)
Column Filterread 2026-09-27Keep a chosen set of columns and drop the rest
Column Filter (PMML)read 2026-09-27Drop columns and record the change in a PMML preprocessing document
Column Name Replacerread 2026-09-27Rename all columns by regex search and replace on their names
Column Renamerread 2026-09-27Rename selected columns
Column Renamer (Dictionary)read 2026-09-27Rename columns using an old-name to new-name mapping from a second table
Column Resorterread 2026-09-27Reorder columns by hand or by name
Column Splitterread 2026-09-27Split a table's columns into two output tables
Constant Value Column Filterread 2026-09-27Drop columns that hold a single repeated value
DB Column Filterread 2026-09-27In-database: drop columns from the query that defines the DB table
DB Column Name Replacerread 2026-09-27In-database: rename all columns by regex search and replace on their names
DB Column Renamerread 2026-09-27In-database: rename selected columns
Missing Value Column Filterread 2026-09-27Drop columns whose share of missing values meets a threshold
Reference Column Filterread 2026-09-27Keep or drop columns according to the columns present in a second table
Reference Column Resorterread 2026-09-27Reorder columns to follow the order given in a second table
Reference Column Splitterread 2026-09-27Split columns into two tables according to the columns present in a second table
Row to Column Namesread 2026-09-27Promote the values of a chosen row to column names
Table Manipulatorread 2026-09-27Rename, filter, reorder and retype columns of several input tables and stack their rows
OpenRefine (7)
Move column leftread 2026-09-27Move the column one position to the left
Move column rightread 2026-09-27Move the column one position to the right
Move column to beginningread 2026-09-27Move the column to the first position
Move column to endread 2026-09-27Move the column to the last position
Re-order / remove columnsread 2026-09-27Choose which columns to keep and their order, in one dialog
Remove this columnread 2026-09-27Delete the column
Rename this columnread 2026-09-27Rename the column
Pentaho Data Integration (1)
Select Valuesread 2026-09-27Select or remove fields and optionally set type, length and precision
Polars (12)
DataFrame.dropread 2026-09-27Remove the named columns
DataFrame.drop_in_placeread 2026-09-27Remove one column in place and return it as a Series
DataFrame.renameread 2026-09-27Rename columns by a mapping or a function
DataFrame.selectread 2026-09-27Keep or compute a chosen set of columns from expressions
DataFrame.select_seqread 2026-09-27As select, but evaluating the expressions one after another rather than in parallel
Expr.aliasread 2026-09-27Give the output of an expression a new column name
Expr.excluderead 2026-09-27Leave named columns out of a multi-column expression
Expr.name (group)read 2026-09-2710 expressions: prefix, suffix, map, to_lowercase, keep and others; rename output columns or struct fields
Functions: column selection (group)read 2026-09-275 functions: all, exclude, first, last, nth; pick columns of the context by position or exclusion
Functions: context aliases (group)read 2026-09-272 functions: element, field; stand for the current element in eval and the current field in struct.with_fields
Selectors (group)read 2026-09-2739 entries: by_dtype, by_name, matches, numeric, temporal and others; pick columns by type, name pattern or position
polars.colread 2026-09-27Refer to one or more columns by name, pattern or data type, by call or by attribute syntax
Power Query M (7)
Table.Columnread 2026-09-27Return one column's values as a list
Table.PrefixColumnsread 2026-09-27Rename every column by adding a text prefix
Table.RemoveColumnsread 2026-09-27Drop the named columns
Table.RenameColumnsread 2026-09-27Rename columns from a list of old-name and new-name pairs
Table.ReorderColumnsread 2026-09-27Put columns in a given order
Table.SelectColumnsread 2026-09-27Keep only the named columns
Table.TransformColumnNamesread 2026-09-27Rename every column by applying a function to its name
RapidMiner Studio (14)
Filter Attributes with Missing Valuesread 2026-09-27Drop columns whose share of missing values exceeds a threshold
Remove Attribute Rangeread 2026-09-27Drop columns by position range
Renameread 2026-09-27Rename one or more columns
Rename (In Database)read 2026-09-27Rename columns, executed in the database
Rename by Example Valuesread 2026-09-27Use the values of a chosen row as column names and drop that row
Rename by Generic Namesread 2026-09-27Rename selected columns to generic names such as att1, att2
Rename by Multiple Examplesread 2026-09-27Build column names by concatenating the values of several rows, then drop those rows
Rename by Replacingread 2026-09-27Rename columns by regex find-and-replace on their names
Rename by Replacing (In Database)read 2026-09-27Rename columns by regex replacement on their names, executed in the database
Reorder Attributesread 2026-09-27Reorder columns alphabetically, by a given list or pattern, or to match a reference table
Reorder Attributes (In Database)read 2026-09-27Reorder columns, executed in the database
Select Attributesread 2026-09-27Keep or drop columns by name, type, regex, or missing-value condition
Select Attributes (In Database)read 2026-09-27Keep or drop columns, executed in the database
Select by Randomread 2026-09-27Keep a random subset of columns
SQLMesh (1)
@STARread 2026-09-27Emit the column selections of a relation, cast to known types, with exclusions, prefix and suffix
Tableau Prep (6)
Hide Fieldread 2026-09-27Hide a field from the profile; it stays unloaded until unhidden and is still written to output
Keep Only Fieldread 2026-09-27Keep the selected fields and drop the others
Remove Fieldread 2026-09-27Remove a field from the flow
Rename Fieldread 2026-09-27Edit the name of a field
Rename Fields (in bulk)read 2026-09-27Rename many fields at once: replace text, add prefix or add suffix; can apply to future fields
Reorder fieldsread 2026-09-27Drag fields into a new order; the order persists to output
Talend (2)
tFilterColumnsread 2026-09-27Reorder, remove or add columns to fit an output schema
tSQLTemplateFilterColumnsread 2026-09-27Reorganise, remove or add columns of a table by name mapping, run in the DBMS
Trifacta (17)
Delete columnsread 2026-09-27Delete one or more columns
Drop Transformread 2026-09-27Remove one or more columns
Header Transformread 2026-09-27Use one row of the data as the column names
Move Transformread 2026-09-27Move columns before or after another column
Move columnsread 2026-09-27Move columns before or after another column
Rename Transformread 2026-09-27Rename columns, or add a prefix or suffix to their names
Rename by removing special charactersread 2026-09-27Rename columns by removing special characters
Rename columnsread 2026-09-27Rename one or more columns by hand
Rename from beginningread 2026-09-27Rename columns by keeping characters from the beginning of the name
Rename from endread 2026-09-27Rename columns by keeping characters from the end of the name
Rename to UPPERCASEread 2026-09-27Rename columns to upper case
Rename to lowercaseread 2026-09-27Rename columns to lower case
Rename with patternread 2026-09-27Rename columns by find-and-replace with a pattern
Rename with prefixread 2026-09-27Rename columns by adding a prefix
Rename with row(sread 2026-09-27Rename columns from the values of one or more rows
Rename with suffixread 2026-09-27Rename columns by adding a suffix
Selectread 2026-09-27Create a new table from a chosen set of columns of the current dataset
VisiData (16)
clean-namesread 2026-09-23Rename visible columns to cleaned, identifier-safe names
hide-colread 2026-09-23Hide current column
hide-selectedread 2026-09-23Hide selected source columns
hide-uniform-colsread 2026-09-23Hide each column that has one distinct value across several rows
normalize-col-namesread 2026-09-23Normalise names of all visible columns
rename-colread 2026-09-23Rename current column
rename-col-selectedread 2026-09-23Rename current column to contents of current cell in selected rows
rename-cols-rowread 2026-09-23Name unnamed visible columns from the selected rows (promote rows to header)
rename-cols-selectedread 2026-09-23Rename all visible columns from contents of the selected rows
slide-leftread 2026-09-23Move current column one position left
slide-left-nread 2026-09-23Move current column N positions left
slide-leftmostread 2026-09-23Move current column to the left end of its section
slide-rightread 2026-09-23Move current column one position right
slide-right-nread 2026-09-23Move current column N positions right
slide-rightmostread 2026-09-23Move current column to the right end of its section
unhide-colsread 2026-09-23Unhide all hidden columns
Background
In relational algebra, a projection keeps a chosen set of attributes and discards the others; for a table, that is picking a subset of its columns.[1] In DuckDB, the SELECT clause specifies the list of columns a query returns, and every expression in it has a name.[2]
When to use it
Reach for it when a table carries more columns than the next step needs, when names arrive in a form that is awkward to type or join on, or when a file must leave with its columns in an agreed order. (Meridian's view) In DuckDB, a star expression can pick columns by matching their names against a pattern with LIKE, GLOB or SIMILAR TO, and the NOT variants exclude the columns that match.[3] In DuckDB, a COLUMNS expression can select columns with a regular expression, a list of column names or a lambda function evaluated for every column in the FROM clause.[3] A pattern is a promise about names you have not seen yet: a column added upstream that happens to match arrives in the output without anyone choosing it, so name the columns outright where the output is a contract others rely on. (Meridian's view)
In DuckDB, the capture groups of a regular expression in a COLUMNS expression can be used to rename the matching columns, with \0 standing for the original column name.[3] Renaming by a rule suits a family of columns that share a prefix or a separator; read the new names afterwards, because two old names can map to the same new one. (Meridian's view)
The method
Relational algebra was introduced by Edgar F. Codd as part of his relational model of data in 1970.[4] In relational algebra, the result of a projection is defined only if the attributes it names are a subset of the relation's header.[1] In relational algebra, projection is idempotent, so a series of valid projections is equivalent to the outermost one.[4] SQL's SELECT allows arithmetic operations to define new columns in the result, which database theory calls extended projection.[4]
In DuckDB, the expressions in the SELECT clause are logically executed only at the end of the query, although the clause appears first.[2]
Compared with the alternatives
In relational algebra, selection commutes with projection if and only if the fields the selection condition references are a subset of the fields in the projection.[4] In practice, filter rows on a column before you drop it, or keep the column until the filter has run. (Meridian's view)
Sources
- [1]Projection (relational algebra) - Wikipediasecondary source
- [2]SELECT Clause – DuckDBdocumentation
- [3]Star Expression – DuckDBdocumentation
- [4]Relational algebra - Wikipediasecondary source
Used in
15 Protocols use this operation:
- NAICS — Industry Classification, steps
load,package - Epoch AI Notable AI Models dataset, steps
raw_models,models - GLEIF — Legal Entity Identifiers, steps
load,package - California Housing dataset, step
load - Census Income (Adult) dataset, step
load - EDGAR ↔ GLEIF — Company-to-LEI Crosswalk, steps
build_sec_entities,load,tier,package - MedMCQA dataset, step
load - Movies (vega-datasets) dataset, step
load - Online Retail II dataset, steps
retail_lines,retail_orders - Palmer Penguins dataset, step
penguins - ScienceQA dataset, step
load - SuperGPQA dataset, steps
corpus,load - NYC Yellow Taxi Trips dataset, step
trips - SEC EDGAR — Company Tickers, steps
load,package - USGS Earthquakes 2025 dataset, steps
raw_earthquakes,earthquakes