semstrait 0.0.1

Compile semantic models to Substrait compute plans
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 14.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.04 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • semstrait/semstrait
    7 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jonbjo

semstrait

Compile semantic models to Substrait compute plans

⚠️ This project is under active development and not yet ready for use.

What is semstrait?

semstrait is a Rust library that transforms YAML-based semantic model definitions into Substrait compute plans, enabling engine-agnostic analytics.

YAML Schema → semstrait → Substrait Plan → Any Engine
                                              ├── DataFusion
                                              ├── DuckDB
                                              ├── Velox
                                              └── ...

Planned Features

  • Semantic Modeling — Define dimensions, measures, metrics, and joins in YAML
  • Query Resolution — Resolve business queries against the semantic model
  • Substrait Output — Generate portable compute plans for any Substrait-compatible engine
  • Lightweight — Pure Rust library, no runtime server required

Example (Planned API)

use semstrait::{Schema, Query, emit_plan};

let schema = Schema::from_file("model.yaml")?;
let query = Query::new("sales")
    .rows(["dates.year", "markets.country"])
    .metrics(["revenue", "quantity"]);

let plan = emit_plan(&schema, &query)?;
// Execute on DataFusion, DuckDB, or any Substrait consumer

Status

🚧 Pre-release — API is unstable and documentation is incomplete.

Follow the repo for updates or star it to show interest.

License

Licensed under the Apache License, Version 2.0.