Stdout Destination
Config block
destination:
type: stdout
No additional fields required. Data is written directly to standard output.
When to use
- Piping data to other tools (
jq,duckdb,wc -l) - Quick previews without creating files
- Integration with other CLI pipelines
Example: preview as CSV
# preview.yaml
source:
type: postgres
url_env: DATABASE_URL
exports:
- name: preview
query: "SELECT id, name, email FROM users LIMIT 100"
mode: full
format: csv
compression: none # no compression for stdout readability
destination:
type: stdout
rivet run --config preview.yaml | head -20
Example: pipe to DuckDB
rivet run --config export.yaml | duckdb -c "SELECT count(*) FROM read_csv('/dev/stdin')"
Example: pipe to jq (CSV → JSON lines)
rivet run --config export.yaml | csvjson | jq '.[] | select(.status == "active")'
Notes
- Only one export can use
type: stdoutper config file (multiple exports would intermix output) - CSV output supports only
compression: none—zstd/gzipon a CSV export is rejected at config load. For compressed (binary) stdout output useformat: parquet; keepformat: csvfor human-readable output - Rivet streams to stdout without buffering the full result
- Progress bars and log messages go to stderr, so they don’t interfere with piped data
--validateand--reconcileflags work normally — results are printed to stderr
Verify
rivet doctor --config preview.yaml
Output:
[OK] Destination Stdout (streaming; no preflight needed)
(stdout is a streaming sink — doctor records the check but performs no write probe)