Automation · Data Formats › CSV
Columns
Cheat sheet · https://pcornel.dk/topic.php?topic=5837
Answer
CSV columns are the fields in each row, usually named in a header line. Keep column names stable, since scripts reference them, and make sure every row has the same number of columns.
Remember
- Scripts reference column names.
- All rows need same column count.
- Keep names stable.
First checks
head -1 file.csv— header columnspython3 -c 'import csv;print(csv.DictReader(open("f.csv")).fieldnames)'— column names- Required columns check — validation
Verify in this order
header → column names → values
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
CSV → Columns · operational reference
| Layer | CSV → Columns operational reference |
|---|---|
| Runtime/ownership | CSV column/schema automation · the tabular schema/mapping layer that assigns semantic column identity, datatype and constraints to positional CSV fields |
| Persistent intent | versioned column schema defining header names, order expectations, datatypes, required/null rules, primary/business keys and transformations |
| Verification | Validate fixtures with reordered, missing, extra and duplicate headers against the production column schema; inspect typed mapping and reject reasons before any downstream write. |
| Expected interpretation | Known columns map by the documented contract, malformed or incompatible schemas fail visibly, valid values convert without loss, and downstream fields receive the intended semantic values. |
| Recovery boundary | retain raw row/header and schema version, fix mapping or producer contract, revalidate the same rows and compare typed output before replaying downstream mutations |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5837