As a data analyst, whenever there is talk about semantic models, I get excited.
I first played with Ossie about seven months ago. One thing I liked from day one: it describes the model as a whole, with native support for several fact tables, no workaround. I liked Malloy too, maybe it was ahead of its time, but its concept of a source was a deal breaker for me: every query starts from one root table and extends out. Coming from Power BI, I need to query the model from any table. Ask for the number of stores by country and I want every store, including the ones with no sales, not only the stores the sales table happens to reach. Ossie got this right.
What put me off was the focus on converting one vendor’s model to another’s. A conversion only works, beyond a demo, when both models have the same capabilities. Take a model with several tables, the way Power BI and other decent BI tools model it, and convert it to a vendor that supports one source table extended with dimensions, basically a glorified wide table. That is not a conversion, it is modeling again. And that’s before the measures: “give me the sum, ignoring this filter” is something we take for granted, but not every semantic model can do it.
What changed
- Ossie is no longer just an exchange format. AI is now extremely good at converting one format to another, so that stopped being the point. Read the PRs and it’s clear: Ossie is becoming an independent model definition, with its own query semantics, not a bridge between vendors.
- Microsoft takes it seriously. Fabric can import an Ossie file. That means real engineering investment, and distribution: Power BI is the de facto standard BI tool.
- The big guns are in. Julian Hyde, who created Calcite and Mondrian and co-wrote the Measures in SQL paper, is contributing.
A spec without an engine
You may say: who cares, it’s a spec. As far as I can tell, there is no open source, independent implementation yet. There is a view expander, written by Julian, so at least it is now spelled out how a query on the model becomes SQL. That’s a good start.
I was missing the bigger picture, though. With AI, the spec matters more than the implementation: the cost of writing an implementation is going to zero, as long as the spec is well defined.
A semantic model is not like a file format
Give the same CSV, JSON or Parquet file to any engine and every engine reads the same rows. A semantic model is different: it holds formulas, and what a formula returns depends on the engine that runs it.
Take the simplest example: salary = sum of base salary + sum of bonus. It works just fine, until one employee gets no bonus. In SQL, a number plus NULL is NULL, so that employee’s salary comes back empty. In DAX, the bonus is blank, and base salary plus blank is the base salary. You can work around it in Ossie by turning NULL into zero, but in DAX you don’t have to think about it, and for BI that is the right behavior.
The same goes for missing dimension members. When a sales row points to a store that is not in the store table, DAX keeps it under a blank store, so the total still adds up. In SQL, an inner join drops that row, and so does a filter on the store, with no error.
It took me playing with Ossie, and working on a toy compiler for it, to really appreciate Power BI. A bit embarrassing after all these years.
Beyond BI
There has always been a disconnect between data engineers and analysts. Same data, but the engineer builds nice wide tables and the analyst rebuilds everything. Imagine a pipeline whose endpoint is not that wide table but a star schema, or a galaxy of several fact tables, described in Ossie: a contract, and a common language between the two. Maybe I’m too ambitious, but that would be awesome.
At Øredev, in a talk on semantic models and Ossie, Kris Jenkins showed a case with PostgreSQL: AI reads the queries an application runs and builds a semantic model from them. He never mentioned BI once.
Simple test
I wrote a model in Ossie (ok AI did), using the development version on main: 7 tables, two fact tables at different grains, 16 measures. Where Ossie SQL can express a measure, it is in SQL; where it can’t (12 of the 16, and they are not particularly complex measures), it is in DAX, which Ossie carries as a dialect. The spec moves fast and the platforms are still catching up, so for now none of them reads that exact file:
- Fabric reads an older development version, and only DAX measures: it ignores the SQL ones.
- Snowflake reads only the released version,
0.1.1, and no DAX. - Databricks and BigQuery have no Ossie import at all.
So I rebuilt the same model natively on Power BI, Snowflake, Databricks and BigQuery, and asked each the same 15 questions. The Ossie file itself is answered by dax-sql, the toy compiler, started by N.S. Devaraj: fully AI generated, just a proof of concept. It’s all in a dashboard. It’s not a benchmark. It’s there for my own sanity: when I talk about Ossie with someone, hopefully we can at least use the same words, and share an understanding of what it is today.
It’s early
There is maybe too much excitement. As far as I can tell, measures that change the filter context (last year, % of total, ignoring a filter) are not in the spec yet, only named as a future extension: that is why 12 of my 16 measures are in DAX. And as the salary example shows, even a simple sum can give different numbers depending on which engine runs it. It will take a long time to settle.
Obviously, I don’t know the future, but it feels like the early days of Parquet. A different kind of standard, but when Parquet came out, it could not do what the established proprietary formats of the time did. Look where it is now.
Don’t get me wrong, I’m not trying to be negative. It’s exciting. It’s just the early days.