Skip to content

File I/O

File I/O connectors read data from local files into the pipeline and write results back to disk.

OperationDirectionDescription
file.readSourceReads a file and produces a Table or Record.
file.writeSinkWrites a Table or Record to a file.

The format is determined by the format field or inferred from the file extension.

FormatExtensionsNotes
CSV.csv, .tsvConfigurable delimiter, header row, encoding.
JSON.jsonArray of objects or single object.
NDJSON.ndjson, .jsonlOne JSON object per line. Native interchange format.
Parquet.parquetColumnar binary format. Read via DuckDB.
# CSV with options
read-leads:
type: source
op: file.read
params:
path: data/leads.csv
format: csv
options:
delimiter: ","
header: true
encoding: utf-8
outputs:
rows:
type: Table
schema:
name: { type: string }
email: { type: string }
score: { type: number }
# JSON → Record
read-config:
type: source
op: file.read
params:
path: config/settings.json
format: json
outputs:
settings: { type: Record }
# NDJSON → Table
read-events:
type: source
op: file.read
params:
path: logs/events.ndjson
outputs:
events: { type: Table }
# Parquet → Table
read-warehouse:
type: source
op: file.read
params:
path: warehouse/orders.parquet
outputs:
orders: { type: Table }
write-results:
type: deterministic
op: file.write
params:
path: output/qualified.csv
format: csv
options: { delimiter: ",", header: true }
inputs:
data: { type: Table, from: ref(filter-leads.qualified) }

Specify format: json or format: ndjson for other output formats. The same options fields apply.

FieldRequiredDefaultDescription
pathYesFile path, relative to project root.
formatNoInferred from extensionOne of csv, json, ndjson, parquet.
options.delimiterNo,Column separator for CSV.
options.headerNotrueFirst row contains column names (CSV).
options.encodingNoutf-8File encoding (CSV).

Paths are resolved relative to the project root. Absolute paths are rejected.