Expand description
Writing the view to an export file.
run takes the view’s plan to a committed file. Uncompressed CSV and
Parquet stream: Polars’ sink encodes the plan batch by batch into the
OutputFile, and no frame of the whole output is built. Everything else —
compressed CSV, JSON, NDJSON, IPC, Avro, any export with the streaming
engine off, and builds without it — collects the plan and encodes the
frame. Either way the destination changes only at the commit, after the
last byte, the encoder’s finish and the final flush have succeeded.
Streaming bounds what the export holds, not what the plan needs: a sort, a group-by or a join still gathers its input before its first row leaves.
Structs§
- Export
Options - Export
Request - One export: the file, its form, and whether it may replace a file there.
Enums§
- Route
- How an export’s rows reach its file.
Functions§
- encode
- Encode
dfintosinkand finish: every buffer is drained, the encoder’s last block and trailer written andsinkflushed before this returns, so a failure in any of them is an error here rather than one lost when a writer is dropped. - run
- Run an export: plan
lfas the format needs (ExportFormat::prepare), write it to the request’s path by itsRoute, and commit.writtenhears the bytes written so far: 0 as the write starts, then a few times a second. The destination changes only if every byte was written.