Define once. Use everywhere.¶
Any database. Any agent. An Apache Ossie-native semantic layer for metrics.
Define metrics and semantic models once in Apache Ossie (formerly OSI). Dosi turns them into native SQL for 16 warehouse dialects — DuckDB, Postgres, Snowflake, ClickHouse, StarRocks, and more — and serves them to every consumer: CLI, MCP, REST + Arrow, Python.
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.
Built on Apache Ossie¶
Apache Ossie, formerly Open Semantic Interchange (OSI), is the open specification for semantic models: datasets, relationships, dimensions, and metrics written once in plain YAML and portable across BI tools, AI agents, and data platforms.
Ossie defines what a metric means; Dosi is the engine that runs it. Dosi validates your model against the upstream spec, plans the joins, and emits correct SQL for each warehouse. Your model stays standard Ossie, so it is never locked to Dosi.
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¶
-
The same Apache Ossie model compiles to correct, pushed-down SQL for 16 dialects — DuckDB to Snowflake, StarRocks to DWS and Oracle. Switch warehouses with a flag, not a rewrite.
-
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.
-
Standard Apache Ossie, no lock-in
The input is pure Apache Ossie (formerly OSI) YAML — an open interchange with bidirectional converters for dbt, Snowflake, Databricks, Tableau, and more. SQL 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.
-
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¶
-
Get the
dosibinary and verify it in a couple of minutes, no database required. -
A hands-on, 10-minute tutorial from a model to real results you can verify by eye.
-
What is Apache Ossie & Why Dosi
The open spec Dosi is built on, the 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.