Are all semantic layers created the same?

Semantic layers are all the rage these days. There are many popular ones, and it can be hard to know which one you want to use, if any. The goal of this post is to give you a mental map of the domain, the things to look at when choosing one, and the strengths and weaknesses of indivudual ones.

Here we will be speaking about the semantic layers in the sense of a governed collection of metric and dimension definitions, to be used for reliably creating database queries. Sometimes the term is also used in a different sense, to do with ontologies and knowledge graphs, which we will not cover here. We will focus on the open source ones, as the commercial ones are harder and more expensive to access and review.

The incumbents in the semantic layer space are MetricFlow (dbt’s semantic layer engine) and Cube.js; worth mentioning is Lightdash, which used to be more of a dashboard solution but is now increasingly beefing up its semantic layer side. A project to watch is Apache Ossie (formerly Open Semantic Interchange), which aims to become an open source semantic layer standard. At the moment it only has a limited spec for specifying datasets and no reference semantics for querying, so definitely worth following but not a full solution at the moment. Finally, we will cover SLayer, a recent entrant aiming to be used by agents as well as humans.