Grammar element · operations.columns
Column operations change the table contract
Select, rename, and cast are three distinct moves. Each valid example changes one aspect only.
transformations.yaml4 steps
What changes
Membership, names, or types — one dimension of the column contract at a time.
What operations.columns is
Column operations are the three transformations that change which columns exist, what they are called, or what types they hold.
They do not filter rows or compute grouped results. Those effects belong to other operation families and should remain separate steps.
What it contains
- select — Keeps an ordered, non-empty list of columns.
- rename — Maps old names to new names.
- cast — Maps columns to supported target types.
Membership, names, and types are different
Keeping the three moves separate makes a pipeline readable. A reviewer can see whether a step narrows the table, changes its vocabulary, or converts its values.
Run the complete example
Copy this manifest from the verified documentation project, then run it from the repository root.
version: "1.0"
transformations:
steps:
- cast:
mapping: {amount: float}
- rename:
mapping: {amount: total_amount}
- select:
columns: [order_id, customer_id, total_amount, status]
hdrctl run examples/tutorial/dsl-elements -t columns.yaml
✅ Pipeline completed successfully in 2.4s Rows read : 30 Rows written: 30
The relevant command syntax, copied from hdrctl run --help:
hdrctl run [PATH] -s, --sources FILE explicit path to sources.yaml -d, --destinations FILE explicit path to destinations.yaml -t, --transformations FILE explicit path to transformations.yaml -P, --param KEY=VALUE override a parameter, repeatable