Skip to content

Define once. Use everywhere.

An OSI-native semantic layer for metrics across every data platform

One open model in, correct warehouse-specific SQL out — so revenue means the same thing in DuckDB, Postgres, Snowflake, ClickHouse and StarRocks.

One OSI YAML file becomes an OSI semantic model. On the left it is compiled and pushed down as SQL to 13+ dialects — DuckDB, StarRocks, ClickHouse, Doris, TiDB, Trino, Postgres, MySQL, Snowflake, BigQuery, Databricks, Redshift and Hologres. On the right the same model is served over one contract in several shapes: the dosi CLI, a REST API, zero-copy Arrow IPC, and an MCP server, consumed by apps, notebooks and agents.

The problem it solves

Every dashboard, query, and notebook re-implements what a metric means — and the copies drift. One filters cancelled orders, another doesn't; a stray join quietly doubles the total. You end up with two "correct" numbers that disagree.

Dosi gives you one place to define each metric and generates the SQL for you — the same definition, correct on every warehouse, with the double-counting mistakes engineered out.

See it in 30 seconds

Define metrics once in a model, then ask for them by name:

$ dosi list metrics --model fixtures/orders/model.yaml
NAME              KIND        DATASETS          DESCRIPTION
revenue           aggregate   orders            Total order amount
order_count       aggregate   orders            Number of orders
unique_customers  aggregate   orders            Distinct purchasing customers
avg_order_value   ratio       orders            Revenue per order (ratio)
total_margin      expression  orders, products  Revenue minus cost (expression over two aggregates)

$ dosi query --model fixtures/orders/model.yaml \
    --metrics revenue --group-by orders.status --execute --db orders.db
status     revenue
completed  350
cancelled  100
2 rows

Change --dialect snowflake and the SQL changes — your model doesn't.

Why teams use it

  • One model, many warehouses


    The same OSI model compiles to correct SQL for 13+ dialects. Switch warehouses with a flag, not a rewrite.

  • Correct by construction


    Fan-out protection means it never silently double-counts. If a number can't be computed safely, it tells you — it doesn't guess.

  • Open standard, no lock-in


    The input is pure OSI YAML — a vendor-neutral format. No proprietary semantic layer to buy into.

  • Fast, and Arrow-native


    A compact Rust engine with an in-process DuckDB and zero-copy Arrow result streaming into DuckDB, Polars, or pyarrow.

  • Use it your way


    A CLI, a REST + Arrow server, and Python bindings — same engine, same answers.

  • Built for automation


    Structured, machine-readable errors with stable codes and suggested fixes — so scripts and AI agents can self-correct.

Start here

  • Install


    Get the dosi binary and verify it — a couple of minutes, no database required.

  • Run your first metric query


    A hands-on, 10-minute tutorial from a model to real results you can verify by eye.

  • Why Dosi


    What OSI is, what problem a semantic layer solves, and why the numbers are trustworthy.


Open source under Apache-2.0. Source, issues, and design notes live on GitHub.