Module rs_write

Module rs_write 

Source
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) and parallel Parquet writes via temporary files.

Structsยง

ReadStatParquetWriter ๐Ÿ”’
Internal wrapper around the Parquet Arrow writer, allowing ownership transfer on close.
ReadStatWriter
Manages writing Arrow [RecordBatch] data to the configured output format.

Enumsยง

ReadStatWriterFormat ๐Ÿ”’
Format-specific writer variant, created lazily on first write.

Functionsยง

format_with_commas ๐Ÿ”’
Formats a number with comma thousands separators (e.g. 1081 -> โ€œ1,081โ€).
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.