Skip to content

Define once. Use everywhere.

Any database. Any agent. An OSI-native semantic layer for metrics.

Define metrics and semantic models once with OSI (Apache Ossie). Dosi turns them into native SQL for 15 warehouse dialects — DuckDB, Postgres, Snowflake, ClickHouse, StarRocks, and more — and serves them to every consumer: CLI, MCP, REST + Arrow, Python.

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:

$ export DOSI_EXAMPLES=~/.local/share/dosi/examples
$ dosi list metrics --model $DOSI_EXAMPLES/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 $DOSI_EXAMPLES/orders/model.yaml \
    --metrics revenue --group-by orders.status --execute --db orders.db
status     revenue
completed  350
cancelled  100
2 rows

That path is where the install script puts the bundled example models, and dosi info prints it back. The tutorial seeds orders.db in one command.

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

Why teams use it

  • Any database


    The same OSI model compiles to correct, pushed-down SQL for 15 dialects — DuckDB to Snowflake, StarRocks to Oracle. Switch warehouses with a flag, not a rewrite.

  • Any agent


    A native MCP server answers plain-English questions through your metrics. Structured errors stay short and specific — stable codes, candidate names, and fix-it hints — so an agent self-corrects instead of retrying blind.

  • Define once, no lock-in


    The input is pure OSI YAML — an open interchange with bidirectional converters for dbt, Snowflake, Databricks, Tableau, and more. Metrics move in, and back out.

  • Metric algebra you can trust


    The engine knows whether each metric is additive, rolls up across grains, or can be forecast — and fan-out protection means it never silently double-counts. That same knowledge powers built-in attribution: one call explains why a metric changed, decomposed with the method exact for that metric's type.

  • Fast, and Arrow-native


    10–20x faster than MetricFlow at ~10x less memory, with zero-copy Arrow result streaming into DuckDB, Polars, or pyarrow. See the benchmarks.

  • Use it your way


    A CLI, a REST + Arrow server, an MCP server, and Python bindings: same engine, same answers.

Start here

  • Install


    Get the dosi binary and verify it in 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.

  • Ask questions with Claude Code


    Register Dosi as an MCP server and let an agent answer in plain English, through your metrics, not guessed SQL.


Dosi is a product of Datus. For access, licensing, or support, get in touch with the Datus team, or see Datus Studio, the commercial platform Dosi powers.