Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Local Filesystem Destination

Config block

destination:
  type: local
  path: ./output                    # directory for output files

path can be absolute (/data/exports) or relative. A relative path is anchored to the directory of the config file, so ./output beside /etc/rivet/rivet.yaml is /etc/rivet/output whatever directory rivet is started from (before 0.32 it was relative to the working directory, and only a run started outside the config’s directory lands elsewhere now; while the old place alone still holds the export’s files, the command is refused with RIVET_DEST_RELATIVE_PATH_MOVED naming both directories).

Rivet creates the directory if it does not exist.

Output filenames

Files are named automatically:

{export_name}_{YYYYMMDD}_{HHMMSS}_{mmm}_{pid}_{nonce}.{format}

{YYYYMMDD}_{HHMMSS}_{mmm} is the UTC millisecond the run started and {pid} the id of its process (both taken from its run id); {nonce} is 16 random hex digits. Two runs never write one file name, even when they start in the same millisecond with the same process id (two containers).

Examples:

  • users_daily_20260406_120000_123.parquet
  • orders_incremental_20260406_120000_123.csv (CSV is always uncompressed — a compression codec on CSV is rejected at config validation, see Compression below)

For chunked exports, each part appends _chunk{N} plus a 16-hex random nonce (the nonce guarantees re-runs/repairs never overwrite an existing part):

  • orders_chunked_20260406_120000_chunk0_9f3a1c2b4d5e6f70.parquet

File splitting

For large exports, split output into multiple files:

exports:
  - name: big_table
    query: "SELECT * FROM big_table"
    mode: full
    format: parquet
    max_file_size: "256MB"          # split when file exceeds this size
    destination:
      type: local
      path: ./output

Parts are named: big_table_20260406_120000_123_4711_a1b2c3d4e5f60718_part0.parquet, ..._part1.parquet, etc. (unpadded part index; the stamp is the run’s start millisecond, its process id and a random nonce).

Accepted size suffixes: KB, MB, GB (case-insensitive).

Compression

Compression is applied before writing to disk:

exports:
  - name: users
    query: "SELECT * FROM users"
    mode: full
    format: parquet
    compression: zstd               # default for Parquet
    compression_level: 3            # optional: 1 (fast) to 22 (smallest)
    destination:
      type: local
      path: ./output
FormatDefault compressionOptions
Parquetzstdzstd, snappy, gzip, lz4, none
CSVnonenone only

CSV does not support compression — parquet is the compressed format. A compression: other than none on a CSV export is rejected at config validation. Compress CSV output downstream (e.g. gzip) if you need it.

Verify

rivet doctor --config my_export.yaml

Output:

[OK]  Destination Local(./output)

List exported files

rivet state files --config my_export.yaml
rivet state files --config my_export.yaml --export users_daily --last 5