Expand description
The csv format — currently the only implemented COPY FROM STDIN
format.
Parsing and typed conversion both reuse arrow-csv’s incremental
Decoder — the same engine backing
GreptimeDB’s file-based COPY ... FROM 'file.csv' (see
common-datasource‘s csv file format) — so both COPY routes accept
identical data. The decoder splits records (quoting, escaped quotes,
custom delimiters, \n/\r\n separators, optional headers) and
converts fields against the targeted columns’ schema in one pass.
Consequences of sharing the engine: JSON and Binary columns are rejected, timestamps must be date/time strings (offset-free ones parse in the session timezone), and an empty field — quoted or not — is NULL, exactly like file-based COPY.
Structs§
- CsvCodec 🔒
- The validated
csvformat configuration. - CsvRecord
Parser 🔒 - Incremental parser backed by arrow-csv’s decoder.
Functions§
- build_
csv_ 🔒codec - Builds the CSV codec from the parsed options.
- decode_
error 🔒 - parse_
pg_ 🔒bool - Parses PostgreSQL’s boolean spellings:
true/false,t/f,yes/no,on/offand1/0, case-insensitive with surrounding whitespace allowed (see the BOOLEAN type’s input grammar). COPY OUT emitst/f, so accepting them keeps both COPY directions round-trippable.