csv-map
Overview
Map CSV columns using a YAML mapping profile. Supports column renaming, reordering, selection, built-in transformers (uppercase, lowercase, trim, date_format, default), static columns, and streaming row-by-row processing.
Usage
python main.py csv-map -m PROFILE -i INPUT -o OUTPUT [OPTIONS]
Options
| Option | Description | Default |
|---|---|---|
-m, --mapping | Path to YAML mapping profile (required) | -- |
-i, --input | Path to input CSV file (required) | -- |
-o, --output | Path for output CSV file (required) | -- |
--validate-only | Validate profile without processing data | false |
Prerequisites
- Repo: content-conductor
- Install:
pip install -r requirements.txtfrom repo root
Examples
Map CSV columns using a profile
python main.py csv-map -m profile.yaml -i input.csv -o output.csv
Validate profile only
python main.py csv-map -m profile.yaml -i data.csv -o out.csv --validate-only
Output
Writes a transformed CSV with mapped columns. Reports row count and column mapping summary.
Related Commands
cc validate-- validate markdown documents