Skip to main content

Module source

Module source 

Source
Expand description

Record sources: JSONL / NDJSON, JSON arrays, CSV / TSV (each optionally gzip), SQLite tables or queries, and stdin. Every source yields JSON objects; line-oriented formats stream, so inputs far larger than memory are fine.

Any other database works through its export tool and stdin, e.g. psql --csv -c 'select ...' | leviathan index - --format csv.

Structs§

Source

Enums§

Item
One unit read from a source.

Functions§

byte_size
discover
Expand files and directories into sources. Directories contribute every JSONL, JSON, CSV and TSV file (optionally .gz) beneath them; SQLite files must be named explicitly.
manifest
Paths, sizes and mtimes; empty when a source cannot be fingerprinted (stdin), which forces a rebuild.
read
Stream every record of source into on. Return false from on to stop early (sampling).