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

File (CSV / JSON / JSONL)

Schemes: file://

Query parameters recognised as config fields for this connector. The object-typed csv is set with a JSON literal, e.g. ?csv={...}. Unrecognised parameters are not forwarded as driver options, so any other ?key=value pair is rejected rather than silently ignored.

NameTypeRequiredDefaultDescription
compressionnone | gzip | lz4 | zstdnononePer-batch compression (none, gzip, lz4, zstd). Requires the compression feature. Publishers: always. Consumers: must match, and only the default consume mode reads it.
csvobjectnosee belowCSV dialect (separator, quote, header, columns); only read with format: csv.
deletebooleannofalseRemove acknowledged lines from the file. Only safe if no other process writes to it.
delimiterstringno—Optional delimiter for messages. Defaults to newline (“\n”). Can be a string or a hex sequence (e.g. “0x00”). Currently only single-byte delimiters are supported.
encryptionobjectnonullAt-rest AEAD encryption applied after compression. Requires the encryption feature. Publishers: always. Consumers: must match, and only the default consume mode reads it.
formatnormal | json | text | raw | csv | parquetnonormalThe format for writing messages to the file (Publisher) or interpreting them (Consumer). Defaults to normal.
fsyncoff | batch | periodicno—(Sink only) When appended data is fsynced: off (default), batch (before each ack) or periodic.
fsync_interval_msintegerno—(Sink only) Interval for fsync: periodic in milliseconds. Defaults to 1000.
group_idstringno—The consumer group ID that is used for offset tracking. Should be unique.
idempotencybooleanno—Deprecated: use name_by. true = source_position, false = write_time; ignored when name_by is set.
modeconsume | subscribe | group_subscribeno—
name_byauto | source_position | write_timenoauto(Sink only) write_time (default here, appends to path) or source_position (replay-safe part files, path is their directory).
pathstringyes—Path to the file, or to the directory holding the part files under source_position naming.
read_from_tailbooleannofalseIf true, starts reading from the end of the file if no offset is stored. If false, starts reading from the beginning.
source_metadatabooleannofalse(Consumer only) Include authoritative mqb.src.file_* source positions; only consume mode reproduces them across restarts. Defaults to false.

Struct-typed fields

csv

CSV dialect for format: csv: field separator, quoting, header and nested values.

NameTypeRequiredDefaultDescription
columnsarray of stringno—Column names. A source uses them instead of the header’s; a sink writes exactly these, in this order.
headerbooleanno—Whether the first record names the columns. Defaults to true; a source without one needs columns.
nestedflatten | jsonnoflatten(Sink only) Nested objects: flatten into parent.child columns (default) or json text in one cell.
on_mismatchwarn | failno—(Sink only) A record whose keys differ from the columns: warn (default) writes it anyway, fail rejects it.
quotestringno—Quote character, or none for unquoted fields. Defaults to ".
separatorstringno—Field separator: one character, tab, space, hex (0x1f) or auto (source: guessed from the first record). Defaults to ,.