How the Databricks semantic layer works with Unity Catalog, and what your data team should know before agents come to depend on it.

Ka Ling Wu
Co-Founder & CEO, Upsolve AI
10 min

The Databricks semantic layer is a set of governed business definitions, built on Unity Catalog Metric Views, that lets data teams define metrics and dimensions once and reuse them consistently across SQL, dashboards, BI tools, and AI agents. Instead of encoding the logic for "revenue" or "active customer" inside a single reporting tool, the Databricks semantic layer pushes those definitions down into the platform, so the same number resolves the same way no matter who (or what) is asking.
That last part matters more than it used to. For years, metric definitions lived inside dashboards, and different tools quietly disagreed about the same KPI. Now that natural-language agents query your data directly, an inconsistent definition is not just a reporting headache; it is a source of answers you cannot trust. This guide walks through how Databricks approaches semantic modeling through Unity Catalog, what data teams actually need to know before building on it, and how the whole thing maps to the three-layer context architecture (Structure, Meaning, Trust) that any production-grade analytics agent depends on.
Key Takeaways |
|---|
|
What Is the Databricks Semantic Layer?
The Databricks semantic layer is Databricks' answer to a decade-old problem: business logic scattered across pipelines, notebooks, and dashboards, with no single place that says what a metric actually means. Databricks packages its answer as Unity Catalog Business Semantics, and the concrete object you build is a Metric View.
A Metric View is a first-class Unity Catalog object where you define reusable measures (aggregated values like total revenue or distinct customer count) and dimensions (attributes like region, product category, or month). Because these definitions are declarative, the query engine compiles the underlying SQL deterministically at runtime, so every consumer gets the same result from the same definition regardless of how or where they access it. Metric Views entered public preview at the Databricks Data + AI Summit in June 2025, and in April 2026 Databricks announced general availability and its intent to open source the core in Apache Spark, a signal that the company wants the Databricks data model for semantics to travel beyond its own walls.
The core idea: A standard SQL view locks in aggregations and groupings when you create it. A Metric View separates the measure from the fields you slice by, so you define the metric once and let users group by any available dimension at query time.
This is what people mean when they talk about a "unity catalog semantic layer." It is not a separate product you buy; it is a capability built into the governance layer you already use to secure your lakehouse.

How Metric Views Work: The Meaning Layer in Practice
If you have written SQL views, Metric Views will feel familiar, with one important shift in level of abstraction. You are no longer writing a query; you are defining a governed, reusable business concept.
Defining metrics once, slicing them anywhere
You author a Metric View using SQL DDL or the Catalog Explorer UI, with metric logic expressed in a YAML-like structure layered on top of SQL. Inside, you declare the source tables, the joins, the measures, and the dimensions. Once it exists, an analyst or an AI/BI tool simply selects the dimensions they want (region, carrier, month) alongside the measures they need (revenue, on-time rate), and the engine assembles the correct computation. There is no re-coding the logic in each dashboard, and no risk that two teams define the same KPI two different ways.
Semantic metadata for humans and machines
Metric Views also carry semantic metadata: display names, formatting rules, and synonyms. Synonyms are the underrated part. When you tell the semantic layer that "customers," "accounts," and "logos" all point to the same entity, you improve AI agent accuracy and keep display consistent across tools. This is the Meaning layer doing its job: translating the technical data model into the language the business actually speaks.
Performance through materialization
Because a Metric View can be recomputed on every hit, Databricks pairs governed definitions with materialization. You can pre-compute and incrementally refresh aggregations, and the engine automatically rewrites queries to use the materialized results when appropriate. That gives you the usual freshness-versus-performance tradeoff, handled inside the semantic layer rather than through a sprawl of hand-built aggregate tables.
Metric View capability | What it does | Why it matters for teams |
|---|---|---|
Measure/dimension separation | Define a metric once, group by any field at runtime | Kills the "hundreds of one-off SQL views" problem |
Deterministic compilation | Same definition compiles to the same SQL for every consumer | Consistent numbers across humans and agents |
Synonyms and display names | Maps business language to the data model | Higher accuracy for natural-language querying |
Materialization | Pre-computes and refreshes aggregations | Query speed without duplicating logic |
YAML + SQL authoring | Version-controllable, human-readable definitions | Fits engineering workflows and code review |
Unity Catalog as the Governance Foundation: The Structure Layer
A semantic layer is only as trustworthy as the governance underneath it. This is where the Databricks approach is genuinely strong, because Metric Views live inside Unity Catalog and inherit everything Unity Catalog already does.
Unity Catalog is the unified governance layer for data and AI on Databricks. It models every asset as a securable object under a three-level namespace (catalog.schema.object), and it operates beneath every query automatically: enforcing access control, tracking lineage, and logging activity. For a Metric View, this means the metric carries fine-grained permissions by default. If a user cannot see the underlying salary table, they cannot see a metric built on it either.
Lineage is the part that makes this a real Structure layer rather than just a permissions list. Unity Catalog captures lineage automatically, down to the column level, across every workspace attached to the metastore. That gives you impact analysis before you change a table, root-cause tracing when a report looks wrong, and a usage picture (the Insights tab surfaces query patterns and top consumers) that tells an agent which tables are actually authoritative.
There are honest limits worth knowing. Column-level lineage breaks when data is referenced by file path instead of table name, and user-defined functions can obscure the mapping. Lineage also does not traverse the Delta Sharing boundary, so usage by a downstream team consuming a shared table will not appear in the source metastore. None of these are dealbreakers, but they shape how complete your Structure layer really is.
For the fundamentals of what a semantic layer is and why it matters across vendors, our semantic layer fundamentals guide covers the concept in depth.

Beyond a Single Warehouse: Lakehouse Federation and Its Limits
The word "beyond" in this article's title is doing real work. A common critique of any warehouse-native semantic layer is that it only governs the data inside its own walls. Databricks addresses this with Lakehouse Federation, and the nuance here is important because the honest answer is neither "single-source only" nor "fully multi-source."
Lakehouse Federation is Databricks' query federation platform. It lets you run governed, read-only queries against external systems (PostgreSQL, MySQL, SQL Server, Snowflake, Redshift, BigQuery, and others) without moving the data, through Unity Catalog foreign catalogs. Those foreign tables inherit Unity Catalog governance and lineage, and in principle you can build a Metric View that joins lakehouse data with federated data so a business user never has to know that "customer lifetime value" spans three systems.
That is a real multi-source story, but read the fine print:
Read-only. Federation supports reads, not writes. It is an access pattern, not an integration layer.
Performance varies. If the external system does not support query pushdown well, or if it is under load, federated queries can be slow, and poorly written ones can strain production databases.
Everything routes through Databricks compute. The semantic layer's authority is centered on Unity Catalog, so your governance story is only as clean as your Unity Catalog adoption.
The practical takeaway: the Databricks semantic layer reaches beyond a single warehouse, but it does so from a Databricks-centric center of gravity. If your organization already runs on the lakehouse, this is a strength. If your data and your teams are genuinely spread across independent platforms, federation is a bridge with tolls, not a free-for-all.

How the Databricks Semantic Layer Maps to the Three-Layer Context Architecture
Here is the framing that ties everything together. As a16z has argued, data agents are close to useless without the right context, and that context is not one thing. Any analytics agent that answers questions reliably needs three layers of it: Structure (what data exists and how it connects), Meaning (what that data means at your specific company), and Trust (which answers have been validated). A semantic layer is one part of that picture, not the whole thing. So where does the Databricks approach land?
Context layer | What it requires | How Databricks covers it |
|---|---|---|
Structure | Schemas, tables, lineage, relationships, usage signals | Strong. Unity Catalog delivers automatic column-level lineage, a governed namespace, and usage insights. |
Meaning | Metrics, KPIs, business rules, definitions, synonyms | Good. Metric Views encode measures, dimensions, and synonyms, though they lean toward engineer-authored SQL/YAML. |
Trust | Verified answers, golden assets, corrections, feedback loops | Partial. Governance and deterministic metric resolution reduce error, but validated-answer testing is not a first-class construct. |
Structure: the strongest layer
Unity Catalog is close to a reference implementation of a Structure layer. Lineage, permissions, and usage are captured automatically, which is exactly the raw material an agent needs to know which table to trust and how objects connect.
Meaning: solid, with a modeling tax
Metric Views are a legitimate Meaning layer. The catch is effort and audience. Definitions are authored in SQL and YAML, which fits analytics engineers but assumes real upfront modeling work. Tribal knowledge that lives outside metric definitions (the caveat a good analyst would flag about a weird quarter, for example) still has to be captured somewhere. The Meaning layer is only as complete as the metrics you take the time to encode.
Trust: the layer that stays thin
This is the honest gap. Unity Catalog governs access and lineage, and grounding Genie on Metric Views means natural-language queries resolve against governed definitions instead of inferred logic, which cuts down on invented metrics. That is meaningful. But grounding is not the same as validation. There is no native, first-class loop for golden-query testing, systematically scoring answer accuracy, capturing user corrections, and feeding them back so accuracy compounds over time. Governance tells you a user is allowed to see a number. It does not tell you the number has been verified as correct in context.
For a closer look at how the natural-language side works on top of this foundation, see how Genie uses Unity Catalog for the deeper review.

What Data Teams Need to Know Before Building on It
If you are an analytics engineering lead weighing whether to stand up your semantic layer on Unity Catalog Metric Views, a handful of realities will shape how far the platform carries you.
Unity Catalog adoption comes first
Metric Views inherit their governance from Unity Catalog, so the value scales with how much of your estate is actually governed there. A half-migrated environment gives you a half-strength semantic layer, because any table still sitting outside Unity Catalog sits outside your definitions, permissions, and lineage too. Get the governance footprint right before you count on the semantics.
Semantic modeling is deliberate, engineer-led work
Defining measures, dimensions, joins, and synonyms takes real effort and clear ownership. That is partly a strength, since encoded logic is version-controlled and reviewable, but it is not instant and it is not self-serve. Business users enjoy the result; analytics engineers do the building, and that time needs to be planned for rather than assumed away.
Materialization is a decision, not a default
You choose which metrics recompute on demand and which materialize for speed, and that choice is easy to get wrong in both directions. Over-materialize and you risk serving stale numbers; under-materialize and heavy dashboards crawl. Settle the refresh strategy up front instead of discovering it through slow queries in production.
The lakehouse is where the walls are
The semantic layer is at its most authoritative when data lives in the lakehouse. Federation reaches beyond those walls, but only in read-only mode and with performance caveats, so treat cross-platform metrics as a bridge to design around rather than a capability to take for granted. Know which side of the wall each critical metric lives on.
The Trust layer is yours to build
If your endgame is a reliable analytics agent rather than governed dashboards, the validation work does not arrive in the box. Golden queries, accuracy evaluation, and a loop that captures user corrections all sit on top of what Metric Views provide, and someone on your team has to own them. Budget for that layer from the start, because it is the part that determines whether people actually trust the answers.
This is where the difference between a governed semantic layer and full context infrastructure becomes concrete. The Databricks data model gives an agent excellent Structure and solid Meaning, yet production accuracy still depends on encoding institutional knowledge and validating answers, the work that turns a promising demo into a production-ready agent.
A Strong Foundation, With the Trust Layer Left to You
The Databricks semantic layer is a strong, warehouse-native foundation. Unity Catalog gives you a genuinely capable Structure layer, Metric Views give you a solid Meaning layer, and grounding Genie on those definitions moves the needle on accuracy. For teams already committed to the lakehouse, it is one of the cleaner ways to standardize business logic in one place.
What it does not fully deliver on its own is Trust: the validated-answer loop that turns consistent definitions into answers a business user can rely on without a second thought. If your goal is a production-ready analytics agent rather than governed dashboards, the semantic layer is the starting point, not the finish line, and two questions decide how far it carries you: whether your critical data actually lives in the lakehouse, and who owns the validated-answer loop once the model is built.
The remaining work is context infrastructure: encoding institutional knowledge and systematically proving the agent's answers are correct. To see how a platform built around the full three-layer context architecture approaches that problem, explore multi-source agent platforms built for context engineering.
Frequently Asked Questions
What is the Databricks semantic layer?
It is a set of governed business definitions built on Unity Catalog Metric Views. You define measures and dimensions once, and the platform reuses them consistently across SQL, dashboards, Genie, and external BI tools, so the same metric resolves the same way everywhere. It is a capability inside Unity Catalog, not a separate product.
What is a Unity Catalog Metric View?
A Metric View is a first-class Unity Catalog object that separates a measure (like sum of revenue) from the dimensions you slice it by (like region or month). You define it once in SQL or YAML, and the query engine generates the correct computation whenever a user or agent groups by any available field.
Is the Databricks semantic layer only for data stored in Databricks?
Mostly, but not entirely. It is strongest for data in the lakehouse, and Lakehouse Federation lets you query external sources like Snowflake, BigQuery, and PostgreSQL through Unity Catalog without moving the data. Those federated connections are read-only and can carry performance tradeoffs, so the practical center of gravity stays inside Databricks.
How does the Databricks semantic layer help AI agents like Genie?
Genie spaces can be built directly on Metric Views, which means natural-language queries resolve against governed, deterministic definitions instead of logic the model infers on its own. That reduces invented or drifting metrics. It improves accuracy but does not, by itself, validate that every answer is correct in context.
How is a semantic layer different from a metrics layer?
The metrics layer is the part that defines and standardizes business measures. A semantic layer is broader: it includes those metric definitions plus the entities, dimensions, relationships, and governance that let tools and agents interpret data consistently. In Databricks, Metric Views blur the line by delivering both inside Unity Catalog.
Does a semantic layer alone make an analytics agent reliable?
No. A semantic layer supplies the Meaning layer and, through Unity Catalog, much of the Structure layer. Reliable agents also need a Trust layer: verified answers, evaluation against golden queries, and a feedback loop that captures corrections. That validation work sits above what a semantic layer provides.

Try Upsolve for Embedded Dashboards & AI Insights
Embed dashboards and AI insights directly into your product, with no heavy engineering required.
Fast setup
Built for SaaS products
30‑day free trial








