Expand description
Export query results or whole tables to files.
All row-oriented formats (CSV, Parquet, Arrow IPC, Iceberg) go through
hyperd’s native COPY (query) TO 'path' WITH (format => '…') writer.
The MCP only issues a single SQL statement — no Rust-side type
inference, no JSON intermediate, no in-memory buffering of the
output. Hyperd writes the file (or directory) directly to disk and
reports the written row count back as the statement’s affected-rows.
Supported formats:
- CSV —
format => 'csv', header => true. - Parquet —
format => 'parquet'. Preserves NUMERIC precision, DATE/TIMESTAMP types, and column nullability. Order of magnitude faster than the previous JSON-mediated path. - Arrow IPC Stream —
format => 'arrowstream'. Bit-identical to what Hyper speaks on the wire for its binary Arrow protocol. - Iceberg —
format => 'iceberg'. Destination is a directory (the Iceberg table root withmetadata/anddata/subdirs); hyperd creates it. Round-trips cleanly withload_iceberg. - Hyper — new
.hyperfile populated viaCREATE DATABASE+ATTACH DATABASE+CREATE TABLE AS SELECT, openable directly in Tableau Desktop. (Cannot use plainstd::fs::copybecause on Windowshyperdholds an exclusive lock on the workspace file.)
Structs§
- Export
Options - Specifies what to export and where.
- Export
Result - Returned by
export_to_filewith the exported row count and telemetry.
Functions§
- export_
to_ file - Top-level export dispatcher. Resolves the source SQL, then delegates to the format-specific exporter.