Expand description
Parquet exporter — turns a Workspace into
resources.parquet (+ workspace.manifest.json) on disk per
20-parquet-exporter.md.
Phase 3 closes M0 by shipping the single-table flat schema pinned in
10-data-model.md § 3 (24 columns, all non-null with "" / empty-list
as the “missing” sentinel). Future phases extend the output with
dependencies.parquet, components.parquet, modules.parquet, etc. —
same writer pattern, separate file, same atomic-rename guarantee.
§Trust boundary
The exporter consumes only IR — Workspace values are already trusted
(they crossed validation at discovery / loader / evaluator land). The
one trust boundary the exporter polices is the output path: it
refuses to overwrite existing files unless --overwrite is set, and
writes atomically via <file>.partial → rename (per
[99-key-decisions.md] D10).
Modules§
- json
- Canonical-JSON renderer for the Parquet
attributes_jsoncolumn.
Structs§
- Export
Options - Options for
Exporter::export. - Export
Report - Report returned by
Exporter::export. - Exported
File - A single file the exporter produced.
- Manifest
- Top-level manifest structure.
- Manifest
File - Per-file entry in the manifest.
- Parquet
Exporter - Default
Exporterbacked byarrow-rs+parquet-rs.
Enums§
- Compression
Opt - Supported parquet compression codecs. Phase 3 ships the spec’s
recommended default — zstd-3. The variant set is
#[non_exhaustive]so future codecs can land without a breaking API change. - Export
Error - Errors the exporter can raise.
- Secondary
Table - Which Parquet table to emit alongside
resources.parquet. Phase 8 landeddependencies/components/modulesper spec 91 § 11.
Constants§
- PARSER_
VERSION - Parser version embedded in every emitted row.
- SCHEMA_
MAJOR - Parquet schema major version. Bumps require a deprecation cycle.
- SCHEMA_
MINOR - Parquet schema minor version. Bumps are additive.
Traits§
- Exporter
- Trait for workspace exporters. Phase 3 ships
ParquetExporter; tests may swap in a stub that records calls without touching disk.
Functions§
- components_
field_ names - Column names in declaration order.
- components_
schema - Build the canonical
components.parquetschema (spec 15 § 5). - dependencies_
field_ names - Column names in declaration order.
- dependencies_
schema - Build the canonical
dependencies.parquetschema (spec 10 § 5.1). - modules_
field_ names - Column names in declaration order.
- modules_
schema - Build the canonical
modules.parquetschema (spec 10 § 5.3). - resources_
schema - Build the canonical
resources.parquetschema. - schema_
field_ names - Ordered list of column names for the resources schema.
- write_
manifest - Write the manifest atomically (
.partial→ rename). Returns the byte size on disk after the rename.