Should you build or buy Semantic / Metrics Layer?

A semantic or metrics layer is a centralized data modeling layer that defines business metrics, such as revenue, churn rate, and monthly active users, in a single place so that every downstream tool, BI platform, or AI agent calculates them the same way from the same underlying logic.

Copy reviewed 2026-09-27 · Research revision 2026-09-21

Sources: docs.getdbt.com

Own the metric definitions, rent the thing that serves them. The modeling layer is open and portable across Cube, MetricFlow and the emerging interchange standards, so writing your business logic down is not a lock-in decision. What you would be taking on by self-hosting is a latency-sensitive always-on service with caching and pre-aggregation to keep healthy, which is precisely why the one large named team that started self-hosted did not stay there. If you are standardized on Snowflake or Databricks, price their native semantic objects first — they may make the whole question moot.

Build it, buy it, or bridge?

⚒ Build it
✓ Buy it
➔ Bridge
Cost shape
MetricFlow is free on existing dbt infrastructure; ops overhead only
Per-user SaaS fees; managed cloud adds up at team scale
Self-host core definitions; buy serving layer for external consumers
Time to value
Weeks to model initial metrics; faster if dbt is already deployed
Days to onboarding; faster for teams without dbt expertise
Moderate; requires integrating two layers
Differentiation captured
Metric definitions encode proprietary business logic you control
Standard governance and query APIs; definitions still need your input
Own the logic; buy the serving and governance surface
AI feasibility today
MetricFlow's modeling engine is free and open-source; the AI-agent-ready serving layer still runs mostly on dbt Platform
Managed platforms add cross-tool query APIs and AI-assisted exploration
Build definitions on MetricFlow; buy the API surface for AI agent consumption
Who it fits
dbt shops with BI tools and AI agents that need consistent metrics
Teams needing embedded analytics APIs or lacking dbt infrastructure
Orgs with complex external consumer requirements on top of a dbt base

When building makes sense

Building a semantic layer is the natural path for teams already running dbt. MetricFlow's modeling engine is open-source, actively maintained, and free to run against your own dbt project. Metric definitions (how you calculate MRR, what counts as an active user, which edge cases get excluded from churn) are genuinely proprietary. A competitor with access to your metric definitions would understand your business logic in ways that matter. Owning this layer means faster iteration when business definitions change, and direct control over how metrics are exposed to BI tools, AI agents, and embedded applications. The cost case for the definitions layer is straightforward: MetricFlow is free, and for a team already paying for dbt Cloud or running self-hosted dbt, writing the metric layer costs engineering time, not license fees. Running it as an always-on, cached query service is a separate and harder problem: dbt's own production Semantic Layer runs inside dbt Platform rather than as a self-hosted MetricFlow deployment, so most teams that build the definitions still end up buying the serving layer around them. The Open Semantic Interchange specification, now with broad vendor backing, reduces the risk that building on MetricFlow today creates lock-in problems tomorrow.

When buying makes sense

Buying makes sense when the requirement goes beyond metric definition into managed serving, governance, and cross-tool query APIs. Cube Cloud and AtScale add a query layer that sits between the semantic model and its consumers, handling caching, access control, and the API surface that embedded analytics or third-party BI tools need. If the analytics layer serves external customers rather than internal analysts, or if AI-assisted exploration is a product requirement rather than an internal tool, managed platforms are materially ahead of what self-hosted MetricFlow delivers today. Buying also makes sense for teams that don't have established dbt infrastructure, where the starting point is a managed cloud data warehouse and no existing transformation layer. In that case, rebuilding the path to get to MetricFlow may take longer than simply purchasing a platform that bundles data modeling and serving in one product. The question is whether the governance and API surface you're buying is functionality you'll actually use.

The desk read

Metric definitions encode business logic that's genuinely proprietary. How you calculate MRR, what counts as an active user, which edge cases get included in churn rate: these aren't generic questions and a consistent, centrally defined answer to them is increasingly valuable as more tools consume the same metrics. dbt's MetricFlow modeling engine is open-source and free to run, and owning metric definitions is increasingly the default path for teams already using dbt, though the always-on serving layer those definitions run behind is a separate, and usually bought, piece. The build case gets serious when your team has dbt expertise, when metric consistency across BI tools and downstream AI consumers matters, and when you'd rather own the definition layer than depend on a vendor's interpretation.

Cube Cloud and AtScale add managed serving, governance features, and cross-tool query APIs that go beyond what MetricFlow provides out of the box. Buying earns its keep when you need embedded analytics or API exposure for external consumers, or when your team lacks the infrastructure capacity to run a self-hosted semantic layer reliably. The Open Semantic Interchange specification, with broad industry backing, is worth watching: it signals that the metric definition layer is converging toward a standard that multiple vendors and open-source tools will implement, which changes the lock-in risk of building on MetricFlow today.

Representative vendors CoginitiCube CloudAtScaleSnowflake Semantic ViewsDatabricks Metric Views + 7 more, listed in the full index

Frequently asked

What is a Semantic / Metrics Layer?

A semantic or metrics layer is a centralized data modeling layer that defines business metrics, such as revenue, churn rate, and monthly active users, in a single place so that every downstream tool, BI platform, or AI agent calculates them the same way from the same underlying logic.

When does building a Semantic / Metrics Layer make sense?

Building makes the most sense for teams already running dbt. MetricFlow's modeling engine is open-source and free, which makes the economics clear for organizations that want to own their metric definitions, though the always-on serving layer that exposes them to BI tools and AI consumers is the part most teams still buy.

When does buying a Semantic / Metrics Layer make sense?

Buying makes sense when you need managed serving, cross-tool query APIs, or embedded analytics capabilities beyond what MetricFlow provides, or when your team lacks existing dbt infrastructure and wants a single platform that handles both modeling and serving.

What are the main Semantic / Metrics Layer vendors?

Representative vendors include Coginiti, Cube Cloud, AtScale, Snowflake Semantic Views, Databricks Metric Views. B4 Pro includes the category score and the full vendor list.

What is the Open Semantic Interchange specification?

The Open Semantic Interchange spec is an emerging standard, backed by 40+ vendors and projects, for how metric definitions are shared across different tools and platforms. Its broad adoption signals that building on open standards like MetricFlow today carries less vendor lock-in risk than it did a few years ago.

The B4 Index scores every software category on two axes, strategic differentiation and AI feasibility, to classify it Build, Buy, Bridge, or Beware. See the full methodology.