Semantic layer, metric layer, headless BI: what everyone actually means

Three terms that seem interchangeable, and the concrete differences that matter when you're picking a tool or defending a definition to your CFO.

Someone in your #data Slack said “we need a semantic layer.” A minute later, a Looker champion in the same thread called it a “metric layer.” Then the AE from the vendor you’re evaluating dropped in and said the modern word is “headless BI.” Three phrases for what sounds like the same thing, and you’re the one who has to pick.

The confusion is not accidental. Each term was coined by a different community for a slightly different reason, they overlap heavily in what they actually do, and vendors use whichever word ranks best that quarter. This post walks through what each means, where the ideas came from, where they genuinely differ, and how to pick without regretting it. By the end you can walk into the next architecture review and translate freely between them.

The three definitions, plainly

Semantic layer is the oldest of the three. The phrase was coined inside Business Objects in the early 1990s to describe a “universe” - a mapping from user-facing dimensions and measures to the underlying warehouse tables, so an analyst could drag “Revenue by Region” without writing SQL. MicroStrategy shipped the same concept as “schema objects.” Cognos called it a “framework model.” SAP eventually acquired Business Objects and the language went with it. In 2012, Looker productised the same idea for the modern warehouse world by making the mapping a code artifact called LookML, checked into git. In every version the intent is identical: hide the schema, expose the business concepts, translate concept queries into SQL at request time.

Metric layer is a much younger phrase and it comes from a specific place: Airbnb published the Minerva post in mid-2021 describing how they had centralised metric definitions in a YAML-based system that fed both dashboards and machine-learning features. Chad Sanderson championed the term hard through the following year on Substack. The concept narrowed the semantic-layer scope to one job: the definition of a KPI as code. A metric layer does not necessarily model every dimension in your warehouse; it models the ones a metric depends on. If the semantic layer is “everything the BI tool needs to know about your business,” the metric layer is “the SQL for MRR, DAU, churn, NPS, and every other named KPI, as versioned code.” Transform (acquired by dbt Labs in 2023 and folded in as MetricFlow, now the engine behind the dbt Semantic Layer) was the first standalone metric-layer product to reach scale.

Headless BI is the newest of the three and the most architectural. Cube.dev popularised the phrase around 2021: take the semantic layer out of the BI tool and expose it as a service - SQL API, REST, GraphQL - so any front end can query it. A dashboard, a spreadsheet plugin, a Jupyter notebook, an AI seat, an embedded app - all of them hit the same layer and get the same answer. Headless BI does not necessarily invent a new definition mechanism; it packages an existing one (usually a semantic or metric layer) behind a query surface that BI tools were previously trying to own end-to-end.

Where the overlap is real

Strip away the vendor pitches and all three answer the same question: where does the SQL for “revenue” live, who owns it, and how does every rendering of the number find its way to that definition?

Every serious implementation ships a definition-as-code artifact (YAML, LookML, .malloy, or a config Python object), a compiler that turns “give me revenue by month for the last four quarters” into warehouse SQL, and some way for downstream tools to hit that compiler. The semantic-layer people call the compiler input a “model.” The metric-layer people call it a “metric spec.” The headless-BI people call it a “cube” or a “view.” The compiled SQL that reaches the warehouse looks broadly identical either way.

Where they diverge is scope and delivery mechanism. Here is a dbt metric definition:

# metrics.yml (dbt Semantic Layer / MetricFlow)
metrics:
  - name: active_customers
    description: "Distinct customers with a paid event in the last 30 days"
    type: simple
    label: Active customers
    type_params:
      measure: active_customer_count
    filter: |
      {{ Dimension('customer__status') }} = 'active'

Here is the same idea in Cube:

// active_customers.js (Cube)
cube('ActiveCustomers', {
  sql: `SELECT * FROM prod.customer_events
        WHERE event_at > NOW() - INTERVAL '30 day'`,
  measures: {
    count: {
      sql: 'DISTINCT customer_id',
      type: 'countDistinctApprox',
    },
  },
  dimensions: {
    status: { sql: 'status', type: 'string' },
  },
});

And here is the LookML shape a Looker team already knows:

# active_customers.view.lkml
view: active_customers {
  sql_table_name: prod.customer_events ;;
  measure: count {
    type: count_distinct
    sql: ${TABLE}.customer_id ;;
    filters: [status: "active", event_at: "30 days"]
  }
}

Three languages, one idea. The semantic layer, metric layer, and headless BI communities have spent five years converging on that shape without agreeing to.

Comparison table

CategoryLeading toolsOriginDefinition languageOpen sourceQuery surfacePrimary use case
Semantic layerLookML (Looker)2012LookMLNoLooker onlyGoverned self-service inside Looker
Semantic layerMalloy (Google)2022Malloy DSLYes (Apache 2.0)CLI + notebooks + Malloy ComposerNotebook-first modelling and drilldown
Semantic + metricdbt Semantic Layer / MetricFlow2020 (Transform) / 2023 (dbt)YAML (in-project)Partial (MetricFlow core is OSS; the hosted layer is not)JDBC, GraphQL, PythonMetric queries from any BI that speaks the layer
Metric layerAirbnb Minerva2020 (internal)YAMLNo (internal only)Internal RPCCross-team KPI truth at Airbnb
Metric layerMetricFlow (standalone)2022YAMLYes (BSL)PythonLocal metric spec engine, now inside dbt
Headless BICube (Cube.dev)2019JavaScript / YAMLYes (Apache 2.0 core)SQL API, REST, GraphQLEmbed a semantic layer behind any front end
Headless BIGoodData Cloud2007 (predecessor) / 2022 (Cloud rewrite)LDM (Logical Data Model)NoREST, SQLEmbedded analytics with governed metrics
Headless BI (partial)Databricks AI/BI2024YAML metric viewsNoSQL WarehouseMetric governance inside Databricks estate

Two things worth flagging on that table. First, “open source” is doing heavy lifting - the “yes” boxes cover the core engine, but the hosted or governance tier is usually commercial. Second, Malloy and Cube are the two ends of the spectrum for teams who want a query DSL over SQL versus a config-driven service; picking between them is a language and delivery choice more than a features choice.

When to reach for which

The decision is less about picking the “best” of the three and more about matching the shape of your stack.

If your BI tool ships one, use its. If you’re on Looker, LookML is already there, already governed by PR, and already the query path for every Looker dashboard. Adding a second layer is real cost for marginal governance. Same story if you’re on dbt Cloud with a supported BI (Hex, Preset, Tableau via JDBC, Google Sheets extension): the dbt Semantic Layer is the answer and you should not stand up a second one.

If you have multiple BI tools plus an AI seat, you need a headless option. The moment a second query surface exists - a notebook, a chatbot, a spreadsheet plugin, an embedded app - a BI-internal semantic layer stops being enough because the other surfaces bypass it. Cube, the dbt Semantic Layer with a semantic-aware BI, or GoodData Cloud are the shortlist. The picking heuristic: choose the one whose query surface (SQL / REST / GraphQL) already matches the surfaces you have.

If you’re small and everything is in one BI tool, you don’t need a separate layer yet. A dozen dashboards in Metabase or Superset with well-named models in dbt is already lower drift than most Fortune 500 orgs. Adding a semantic layer at that stage is optimising the wrong problem; ship the dashboards, add the layer when a second query surface (AI, embedded, spreadsheet) appears.

If you’re evaluating for a “modern data stack” rebuild, treat the layer as part of the semantics of your warehouse, not part of the BI tool. Any BI tool you eventually pick should defer to it. This is the shape most large-team rebuilds converge on in 2026.

Failure modes

The failure modes are similar across all three categories, and they are where the drift shows up regardless of what you call the layer:

Metric drift happens when the layer does not own the query surface. If your dashboards route through the semantic layer but your AI seat writes its own SQL against the warehouse, you now have two definitions of MRR and the AI’s is the one your VP screenshots into Slack. The failure is architectural, not a bug in either query. We wrote a full post on the shape of this problem in “Metric drift is the tax you’re paying on every dashboard you haven’t audited” - the audit query at the bottom of that piece will tell you whether you already have it.

Permission drift happens when row-level and column-level policies live in two places - once in the semantic layer, once in the BI tool or the warehouse. A user gets one filter through the dashboard and a different filter through the SQL API. Access control that disagrees with itself is the same class of bug as data that disagrees with itself.

Cost drift happens when the layer materialises pre-aggregates or maintains a cache, and the BI tool on top of it maintains its own cache with different TTLs. The invalidation windows disagree, and users see stale numbers on one surface and fresh ones on another with no obvious cue about which is which.

Definition drift is the failure mode of “documentation-first” semantic layers - the ones where someone described the metric in a wiki, marked it “official,” but the queries never actually route through the definition. This is the failure mode data catalogs quietly ship every day. The description in the wiki is a shadow of the definition, and the shadow does not get executed at query time.

If you notice one thing when evaluating a layer, notice how it prevents the first one. The rest tend to follow.

The one thing they all agree on

The category names disagree; the winning shape does not. Whether you call it semantic, metric, or headless, the principle every serious implementation converges on is the same: the definition of a KPI lives in one place, in code, and every question about that KPI compiles from that definition.

That principle is what actually matters. If your layer honours it - if every rendering of active_customers, on every surface, compiles from the same YAML - the vendor category label is almost irrelevant. If it does not - if the dashboards go through the layer but the notebooks, the AI seat, or the “temporary” CSV export bypass it - the category label protects you from nothing.

The trap in 2026 is not picking the wrong category; it is picking a well-marketed layer that governs one surface while your organisation quietly runs on four.

Closing

If the drift problems above are your problems, Goni is one of the options worth evaluating. It ships a semantic layer that owns the query surface for BI, saved SQL, and the AI Q&A seat in a single product, so definitions cannot silently diverge across surfaces. If you want a side-by-side against Cube, the dbt Semantic Layer, LookML, and the others named in the table, see goni.paysera.com/compare. If you’d rather run the audit first and see whether you have the drift problem at all, start with the query at the bottom of the metric-drift post - it works against Snowflake, BigQuery, Postgres, and ClickHouse, and takes about ten minutes.