Skip to main content

write_parquet

Function write_parquet 

Source
pub fn write_parquet(
    nodes: &[NodeInfo],
    edges: &[ExportEdge],
    rules: &[RuleDef],
    dest: &Path,
) -> Result<(), CliError>
Expand description

Write parquet files to dest: nodes.parquet, edges.parquet, rules.parquet.

Schema for each file:

  • nodes.parquet: key (Utf8), label (Utf8), props (Utf8, JSON)
  • edges.parquet: edge_type (Utf8), src (Utf8), dst (Utf8), derived (Boolean), rule (Utf8, nullable)
  • rules.parquet: name (Utf8), definition (Utf8, JSON)

nodes must be sorted by key, edges by (edge_type, src, dst), rules by name.

Compression: Snappy (parquet-rs default). This is a format detail, not a stability contract — the column encoding and page layout may differ across parquet-rs versions. Use JSONL export when byte-stable reproducibility is required.