Expand description
Output writers for converting Arrow [RecordBatch] data to CSV, Feather (Arrow IPC),
NDJSON, or Parquet format.
ReadStatWriter manages the lifecycle of format-specific writers, handling
streaming writes across multiple batches. It also supports metadata output
(pretty-printed or JSON), parallel CSV/NDJSON batch encoding, and native
parallel Parquet column encoding.
Structsยง
- Parallel
Parquet Writer - Parquet writer that encodes columns concurrently and commits each row group once, in order, to a single output file.
- Parallel
Text Writer - CSV/NDJSON writer that encodes independent batches concurrently and commits their bytes in input order.
- Read
Stat ๐Parquet Writer - Internal wrapper around the Parquet Arrow writer, allowing ownership transfer on close.
- Read
Stat Writer - Manages writing Arrow [
RecordBatch] data to the configured output format. - Staging
Guard ๐
Enumsยง
- Read
Stat ๐Writer Format - Format-specific writer variant, created lazily on first write.
Functionsยง
- csv_
escape_ ๐field - Escapes a single CSV field per RFC 4180: if it contains a comma, double quote, CR, or LF, wrap it in double quotes and double any interior quotes.
- encode_
text_ ๐batch - write_
batch_ to_ csv_ bytes - Serialize a [
RecordBatch] to CSV bytes (with header). - write_
batch_ to_ feather_ bytes - Serialize a [
RecordBatch] to Feather (Arrow IPC) bytes. - write_
batch_ to_ ndjson_ bytes - Serialize a [
RecordBatch] to NDJSON bytes. - write_
batch_ to_ parquet_ bytes - Serialize a [
RecordBatch] to Parquet bytes with Snappy compression.