Your first pipeline
This walkthrough moves a local CSV file to JSON Lines — no external services
required, so it works immediately after cargo install faucet-cli.
1. Create some input
Section titled “1. Create some input”mkdir -p data outcat > data/input.csv <<'CSV'id,name,city1,Ada,London2,Grace,New York3,Linus,HelsinkiCSV2. Write a config
Section titled “2. Write a config”Create pipeline.yaml:
version: 1name: csv_to_jsonl
pipeline: source: type: file config: path: ./data/input.csv sink: type: file config: path: ./out/records.jsonlfaucet run auto-discovers a faucet.yaml / faucet.yml / faucet.json in the
current directory (and a sibling .env), so you can also name the file
faucet.yaml and just run faucet run.
3. Validate, then run
Section titled “3. Validate, then run”faucet validate pipeline.yamlfaucet run pipeline.yaml$ cat out/records.jsonl{"id":"1","name":"Ada","city":"London"}{"id":"2","name":"Grace","city":"New York"}{"id":"3","name":"Linus","city":"Helsinki"}To look at the output in another format, swap the sink for the general local
file sink — the format
follows the extension, and a file only appears once it is complete:
sink: type: file config: path: ./out/records.csv # or .json, .xml, .xlsx, .avro, .parquet4. Preview without writing
Section titled “4. Preview without writing”To see what a source emits without touching a sink, use preview — it runs the
source and prints records to stdout:
faucet preview pipeline.yaml --limit 55. Scaffold from a connector’s schema
Section titled “5. Scaffold from a connector’s schema”faucet init generates a commented config skeleton from any connector’s JSON
schema, marking required fields and commenting out optional ones:
faucet init my_pipeline --source rest --sink postgresAdd a transform
Section titled “Add a transform”Insert a transforms: list between source and sink to reshape records. For
example, normalize keys to snake_case:
pipeline: source: { type: file, config: { path: ./data/input.csv } } transforms: - { type: keys_case, config: { mode: snake } } sink: { type: file, config: { path: ./out/records.jsonl } }Config-exposed transforms include flatten, rename_keys, keys_case,
select, cast, redact, and more — see the
record transforms recipe for the full list.
Next: core concepts.