Skip to main content

Open Source Semantic Layer: Options, Trade-offs, and Fit

Emily Winks, Data Governance Expert, Atlan
Data Governance Expert
Updated:
|
Published:
15 min read

Key takeaways

  • Seven projects checked on 2026-11-05 show five license shapes, so read the LICENSE in the directory you ship.
  • Three engines name a company behind them; the portable spec entered the Apache Incubator on 2026-06-22.
  • Self-hosting Cube Core means running API instances, a Refresh Worker, and a Cube Store cluster.
  • Cube Core and MetricFlow define metrics; the context layer adds owner, certification, lineage, policy, and history.

What is an open source semantic layer?

An open source semantic layer is a code-defined layer where metrics, dimensions, joins, and access rules are written once and served to BI tools, notebooks, and AI agents. Across seven projects checked on 2026-11-05, five license shapes appear, so read the LICENSE in the directory you ship. A context layer adds the owner, certification, lineage, policy, and change history an agent needs before it trusts a definition.

The five license shapes:

  • Plain Apache-2.0: MetricFlow and Rill
  • Plain MIT: Malloy and Boring Semantic Layer
  • Apache-2.0 and MIT by directory: Cube Core
  • MIT with a source-available directory: Lightdash
  • Multi-licensed by path: WrenAI

Is your semantic layer ready for agents?


Open source semantic layers differ in license, governance, and operating cost: across seven projects checked on 2026-11-05, five license shapes appear, from plain Apache-2.0 to path-based multi-licensing. Atlan’s context layer adds the five things your agents need around any of them: owner, certification, lineage, policy, and change history.

Evaluate Your Open Source Shortlist


Give it your shortlist and everything that has to read a metric. It builds the matrix and names the two questions that will decide it. Read the skill.

Paste into a new chat

Use the skill at https://atlan.com/skills/semantic-layer-tool-shortlist.md to evaluate the semantic layer tools we are considering. Ask me for whatever it needs.

Run once in a terminal

curl -fsSL --create-dirs \
  -o ~/.agents/skills/semantic-layer-tool-shortlist/SKILL.md \
  https://atlan.com/skills/semantic-layer-tool-shortlist.md

For an agent

curl -fsSL https://atlan.com/skills/semantic-layer-tool-shortlist.md

Atlan sits beside the semantic layer your team runs and leaves its metric logic alone. For Cube, the documented route is the Cube connector, which the Atlan docs label Private Preview and Partner-built app.

Quick fact Detail
What it is A layer that defines metrics, dimensions, joins, and access rules once and serves them to many tools
License shapes Five, from plain Apache-2.0 to path-based multi-licensing
Governance Three engines name a company behind them; one Apache Incubator specification
Added by the context layer Owner, certification, cross-system lineage, policy, change history

What is an open source semantic layer?

An open source semantic layer is a code-defined layer where metrics, dimensions, joins, and access rules are written once and served to BI tools, notebooks, and agents. According to the Cube Core README, Cube Core defines these in code and exposes them through SQL, REST, and GraphQL, and it is headless: it doesn’t ship a UI. According to the MetricFlow README, MetricFlow compiles metric definitions to multi-dialect SQL.

“Open source” here is a claim about a repository, so the next sections check it project by project. For the concept itself, start with the semantic layer guide, the split between a semantic layer and a metrics layer, and what a semantic model contains.


Which open source semantic layers exist in 2026?

Seven projects are checked on 2026-11-05, and every row comes from the project’s own repository, release page, and docs. Inclusion rule: an open source repository that describes itself as a semantic layer, modeling language, or BI tool with a semantic layer, with a 2026 release. Lightdash and Rill are the BI tools.

Project What it is, per its README Latest release Latest commit on default branch
MetricFlow Compiles metric definitions into reusable SQL v0.213.0, 2026-09-10 2026-10-13
Cube Core “The open-source semantic layer,” headless v1.8.18, 2026-11-03 2026-11-05
Malloy A semantic modeling and query language built on top of SQL v0.0.437, 2026-10-30 2026-11-02
WrenAI An open-source generative BI (GenBI) engine; definitions kept as YAML and Markdown in a repo you own wren-v0.17.1, 2026-10-30 2026-11-02
Boring Semantic Layer A lightweight semantic layer based on Ibis, MCP-friendly v0.3.18, 2026-08-24 2026-10-28
Lightdash An open-source agentic BI platform with a context layer for metrics, joins, and permissions 3.158.0, 2026-11-05 2026-11-05
Rill A BI tool with a YAML semantic layer v0.91.1, 2026-11-03 2026-11-05

Apache Ossie is a specification rather than an engine: a single JSON and YAML spec that entered the Apache Incubator on 2026-06-22. The metriql repository’s last commit was on 2023-03-08.

The ranked view lives in the best semantic layer tools list. The Cube semantic layer and MetricFlow license pages go deeper on the two most-searched engines.


Why does “open source” mean five different licenses?

Terms differ by project, directory, or edition, and five shapes appear across the seven repositories, each read from a LICENSE file or README.

  1. Plain Apache-2.0 covers MetricFlow and Rill. MetricFlow’s LICENSE is the Apache 2.0 text, and the dbt licenses FAQ says it was relicensed as Apache 2.0 in October 2025. Rill’s LICENSE.md is also the Apache License 2.0 text.
  2. Malloy and Boring Semantic Layer are plain MIT.
  3. Cube Core is covered by Apache 2.0 or MIT by directory, with Apache 2.0 the default; GitHub shows NOASSERTION because of the mix.
  4. Lightdash is MIT outside packages/backend/src/ee; that directory sits under the Lightdash Source Available License, which conditions production use on Lightdash’s Terms of Service and an Enterprise Subscription.
  5. WrenAI is multi-licensed by path: code directories and root files are Apache-2.0, docs/ is CC BY 4.0, and the LICENSE says it may introduce modules under AGPL-3.0-only later, with that text already included. The README badge says Apache 2.0.

Read the LICENSE in the directory you will ship, not the badge on the README. The cost side of that choice is in open source versus commercial total cost of ownership, and the dbt Semantic Layer versus Cube page shows the two license paths for one team.


Who governs an open source semantic layer, and does it matter?

Three of the five engines name a company behind them, the specification side is the part with a foundation, and that split decides how stable a dependency you are taking on. The dbt docs say MetricFlow is “developed and maintained by dbt Labs,” the Cube Core README describes Cube as the commercial product built on Cube Core, and the WrenAI LICENSE says its names are trademarks of Canner, Inc. dbt Labs wrote on its blog that it will be governed and maintained with OSI partner organizations and that it hopes to eventually donate the technology to a leading open source foundation. That is a hope, not a date.

Apache Ossie, formerly Open Semantic Interchange, entered the Apache Incubator on 2026-06-22, per the Incubator status page. Its ROADMAP lists “Metric Semantics & Core Semantic Model” as the first working group. The MetricFlow docs say it works with the Apache Ossie format and that, from dbt v1.12, you can define semantic models using Ossie documents.

Portability of definitions is moving first, while engine governance stays tied to individual companies. Pin versions and keep definitions in a repository you own. The trade-off is covered in single-stack lock-in versus a neutral context layer.


Self-hosting an open source semantic layer: components and operating cost

Cube Core’s own docs give the clearest worked example of self-hosting. The Cube Core README says you can self-host it with Docker, and it includes a built-in caching engine. According to the Cube Core architecture page, a typical production deployment includes three components.

Component What the Cube Core docs say it does
API instances (one or multiple) Process incoming API requests; query Cube Store for pre-aggregated data or connected databases for raw data
Refresh Worker Updates pre-aggregations and invalidates the in-memory cache in the background
Cube Store cluster Ingests pre-aggregations built by the Refresh Worker and answers API instances; “In production, Cube Store must run as a separate process”

The production docs add a security line: development mode (CUBEJS_DEV_MODE=true) is an authentication bypass, to be used only on a local development machine.

The cost is the three components, the refresh schedule, and who is on call. MetricFlow’s README describes a different shape: metric requests are compiled into a dataflow-based query plan and translated into engine-specific SQL. The DIY context layer page walks through the same burden for context, and the build versus buy versus bundle TCO page prices it.


Open engine versus hosted edition: what each project’s docs place where

The open engine and the hosted product are documented separately, and each project’s docs show where that line sits. Each row reads from the project’s docs or LICENSE file.

Project Open part, per its docs or LICENSE Where the docs place the hosted or extended part
MetricFlow Apache 2.0: all the code to define metrics and calculate them in multi-dialect SQL, plus its metadata representation of semantic constructs The dbt Semantic Layer docs page header reads “dbt platform | Starter, Enterprise, Enterprise+”
Cube Core “The open-source version of Cube that you can deploy and manage yourself using Docker” The Cube docs carry guides for importing a Cube Core project into Cube Cloud

If your semantic layer already lives in dbt, the dbt MCP server page shows how agents reach it, and the Cube and data catalog integration page covers the Cube side.


Where does an open semantic layer end and a context layer begin?

An open semantic layer defines what a metric means and how it is computed, and the context layer for AI carries what an agent needs around that definition. Cube Core’s README scopes it to metrics, dimensions, joins, and access rules served over APIs; MetricFlow’s, to compiling metric definitions to SQL.

Question an agent asks Where the answer sits
What does this metric mean and how is it computed? Stays in the semantic layer you run
Who owns it? Owner on the asset in Atlan
Is it certified? Certification on the asset
Which upstream tables feed it? Lineage; the Cube connector traces warehouse tables to Cube measures
Which policy applies, and how did it change? Policy rules on personas, and asset change history

Git already gives you the history of the definition files. What it does not give you is one place that holds owner, certification, and lineage across every tool that reads them. WrenAI’s README describes “a governed semantic layer and an AI context layer” in one open source project, so the boundary is not a wall between projects. A team running several tools, plus warehouse tables, dashboards, and agents, still needs that one place. That is the argument in context layer versus data catalog versus semantic layer, and the semantic layer versus data catalog page.

Further reading: context engineering versus a semantic layer, the context layer, and the enterprise context layer pillar.


How to choose an open source semantic layer for your stack

The choice turns on six questions: the first four come from an Atlan agent skill that runs them on your own shortlist, plus a license check and a check on runtime access for agents. Where a README or docs page cannot answer, the check is a test you run.

Criterion What to check
Can every consumer (BI, notebooks, apps, agents) read the definition through an interface? Count the interfaces the README lists; Cube Core lists SQL, REST, and GraphQL
What stops someone bypassing it? Test it: query a warehouse table directly with a BI login and see whether anything notices
Who may change a definition, and what happens downstream? Test it: change one definition in a pull request and see what lists the downstream dashboards
Where does it sit relative to definitions you already have? Whether it reads or replaces what is in dbt today, since a second copy drifts
Which license shape ships in the directory you deploy? The LICENSE in that directory
Can an agent resolve a metric at runtime through an open interface? Test it: have an agent resolve one metric through the layer’s interface and compare it with the layer’s own answer

The same questions are packaged as the semantic-layer-tool-shortlist agent skill, which you point at your own candidates. The seven projects here are not ranked; the best semantic layer tools list is the ranked view.

For the wider decision, read whether you need a semantic layer, the split between a semantic layer for BI and for AI agents, and the context layer evaluation criteria.


Common mistakes when adopting an open source semantic layer

Three mistakes recur. Reading “open source” as one license: the badge and the directory differ, as WrenAI and Lightdash show. Treating the engine as the whole product, since the hosted edition and the open engine are documented separately. Skipping the owner question: definitions sit in a repository with no named owner or certification step, and an agent gets a number nobody stands behind.

Cube Core’s development mode, which its docs call an authentication bypass, belongs on a laptop and nowhere else. Letting consumers query warehouse tables directly is the other quiet failure, since the layer then stops being the one place a metric is defined.

For the self-serve case, see text-to-SQL versus a semantic layer and text-to-SQL for the enterprise.


How Atlan approaches the context around an open semantic layer

Atlan is the context layer for AI, and it sits beside the semantic layer you run. An agent that reads a definition still has to decide whether to trust it, which needs the owner, certification, and policy.

Atlan’s docs describe its context layer as carrying definitions, lineage, policy, and ownership, with certification and audit logs in the compliance overlay. The Cube connector brings cubes, views, dimensions, measures, and segments into Atlan with lineage to upstream tables; the docs label it Private Preview and Partner-built app. Atlan’s agent docs describe agents reading this context through the Atlan MCP server.

Your metric logic stays where it is. For the build path, see what context engineering is and how to implement an enterprise context layer for AI.


License, governance, and cost differ before features do

The seven projects look alike in a feature table and differ in three places it leaves out: the license in the directory you ship, who governs the repository, and the components you operate. Pick the engine on your consumers, and keep owner, certification, and lineage where every tool and agent can read them. Whether MetricFlow reaches a foundation is a hope on a blog today. Run the six questions against your top two candidates, then write down who owns each definition. The AI-ready data page covers what comes after.


FAQs about open source semantic layers

1. What is the best open source semantic layer?


None is best in general. Judge MetricFlow, Cube Core, Malloy, WrenAI, and Boring Semantic Layer on six criteria: consumer coverage, bypass control, change review, fit with existing definitions, license shape, and runtime access for agents.

2. Is the dbt Semantic Layer the same as MetricFlow?


No. MetricFlow is the Apache 2.0 engine that, per the dbt docs, powers the dbt Semantic Layer. The Semantic Layer docs page is labeled “dbt platform | Starter, Enterprise, Enterprise+”, so the two are documented separately.

3. Do you need a semantic layer for AI and text-to-SQL?


You need one when several consumers must agree on a metric, because each otherwise reimplements it. For an agent, check whether the layer exposes an interface it can call: Cube Core lists SQL, REST, and GraphQL, and the Boring Semantic Layer README calls it MCP-friendly.

4. How much does it cost to run an open source semantic layer yourself?


Apache 2.0 and MIT grant use at no charge, so the cost sits in the components you operate and the people who run them. A typical Cube Core production deployment includes API instances, a Refresh Worker, and a Cube Store cluster.

5. Can an open source semantic layer work across more than one warehouse?


Yes. The MetricFlow docs list Snowflake, BigQuery, Databricks, Postgres (dbt v1 only), and Redshift, and the Malloy README lists nine engines. Check each project’s list for the engines you run.

6. Is Apache Ossie a semantic layer?


No. Apache Ossie, formerly Open Semantic Interchange, is a specification for portable semantic definitions: a single JSON and YAML spec, a portability grader, and a Python SDK. It entered the Apache Incubator on 2026-06-22.

7. Does Atlan replace my semantic layer?


No. Atlan, the context layer for AI, sits beside the semantic layer you run and leaves its metric logic alone, adding owner, certification, lineage, policy, and change history around the definition.


Sources

  1. Cube Core README, cube-js/cube on GitHub
  2. Cube Core architecture, Cube docs
  3. Running Cube Core in production, Cube docs
  4. Cube Core overview, Cube docs
  5. Cube LICENSE, cube-js/cube on GitHub
  6. MetricFlow README, dbt-labs/metricflow on GitHub
  7. About MetricFlow, dbt docs
  8. dbt Semantic Layer, dbt docs
  9. Announcing open source MetricFlow, dbt Labs blog (last edited December 18, 2025)
  10. dbt licenses FAQ, dbt Labs
  11. Apache Ossie project incubation status, Apache Incubator (2026-06-22)
  12. Apache Ossie README, apache/ossie on GitHub
  13. Apache Ossie ROADMAP, apache/ossie on GitHub
  14. Malloy README, malloydata/malloy on GitHub
  15. WrenAI README, Canner/WrenAI on GitHub
  16. WrenAI LICENSE, Canner/WrenAI on GitHub
  17. Boring Semantic Layer README, boringdata on GitHub
  18. Lightdash LICENSE, lightdash/lightdash on GitHub
  19. Rill LICENSE, rilldata/rill on GitHub
  20. Import a GitHub repository, Cube docs
  21. Cube connector, Atlan docs
  22. Context layer, Atlan docs
  23. How to monitor your AI agents with Atlan, Atlan docs
  24. What is custom metadata, Atlan docs
  25. Personas, Atlan docs

Share this article

signoff-panel-logo

Atlan is the Context Layer for AI. It translates business knowledge, including data definitions, working procedures, and governance policies, into context AI can actually use. This knowledge lives in a single Enterprise Data Graph that every team and AI agent can reach.

In Atlan's research on a 13-table Formula One dataset, adding enriched metadata as context raised text-to-SQL win rate from 16.1% to 22.2%, a 38% relative gain across 174 queries.

Hundreds of enterprises use Atlan, including Mastercard, Workday, General Motors, CME Group, HubSpot, Fox, Virgin Media O2, and Elastic.

Bridge the context gap.
Ship AI that works.