datasynth-output

Crates.iodatasynth-output
lib.rsdatasynth-output
version0.2.1
created_at2026-01-20 14:56:01.210917+00
updated_at2026-01-24 21:46:43.931418+00
descriptionOutput sinks for CSV, Parquet, JSON, and streaming formats
homepage
repository
max_upload_size
id2056739
size166,886
Michael Ivertowski (mivertowski)

documentation

README

datasynth-output

Output sinks for CSV, JSON, and streaming formats.

Overview

datasynth-output provides the output layer for SyntheticData:

  • CSV Sink: High-performance CSV writing with optional compression
  • JSON Sink: JSON and JSONL (newline-delimited) output
  • Streaming: Async streaming output for real-time generation
  • Control Export: Internal control and SoD rule export

Supported Formats

Format Description
CSV Standard comma-separated values
JSON Pretty-printed JSON arrays
JSONL Newline-delimited JSON (streaming-friendly)

Features

  • Configurable compression (gzip, zstd)
  • Streaming writes for memory efficiency
  • Decimal values serialized as strings (IEEE 754 safe)
  • Configurable field ordering and headers

Usage

use datasynth_output::{CsvSink, JsonSink, OutputConfig};

// CSV output
let sink = CsvSink::new("output/journal_entries.csv", config)?;
sink.write_batch(&entries)?;

// JSON streaming
let sink = JsonSink::new("output/entries.jsonl", OutputConfig::jsonl())?;
for entry in entries {
    sink.write(&entry)?;
}

License

Apache-2.0 - See LICENSE for details.

Commit count: 0

cargo fmt