Skip to main content

Module export

Module export 

Source
Expand description

Export writer for mushroomdb export.

Supports three formats:

  • jsonl: nodes.jsonl, edges.jsonl, rules.jsonl (always deterministic)
  • parquet: nodes.parquet, edges.parquet, rules.parquet (byte-identical output is NOT guaranteed across parquet-rs versions; use JSONL when byte-stable reproducibility is required)
  • graphml: a single .graphml file (nodes + edges only; rules have no GraphML analogue) for import into generic graph viewers and analysis tools

Two runs on the same store state produce byte-identical JSONL and GraphML output (sorted by key / (edge_type, src, dst) / name — callers must pre-sort the slices).

§Float precision loss

Value::Float values that are NaN or ±Inf are not representable in JSON or in GraphML’s numeric attribute types. They are serialised as JSON null (JSONL) or an empty <data> element (GraphML) rather than causing the export to fail. This is a lossy mapping; the original value is irrecoverable from the export. Stores that need exact float fidelity should use the binary backup command instead of export.

Enums§

ExportFormat
Accepted export formats.

Functions§

write_graphml
Write a single GraphML file describing nodes and edges.
write_jsonl
Write JSONL files to dest: nodes.jsonl, edges.jsonl, rules.jsonl.
write_parquet
Write parquet files to dest: nodes.parquet, edges.parquet, rules.parquet.