Why Databricks Introduced Metric Views: One Definition of “Revenue” for Dashboards, Genie and AI Agents

The familiar pattern

For years, revenue has reached the business through a familiar process: engineers build clean lakehouse tables, analysts define the KPI in a BI tool, and other teams write their own SQL. This works as long as everyone applies the same rules, such as which order statuses count and whether refunds are deducted.

The new problem

✔ Every dashboard, notebook and report holds its own copy of the definition, and the copies drift apart.

✔ Standard SQL views “lock in aggregations and groupings at creation time”, so every new breakdown needs another view.

✔ Business users now ask Genie and AI agents questions in plain language. Without a governed definition, an agent has to infer “revenue” from column names.

What is a Databricks metric view?

Databricks describes metric views as “the core implementation of Unity Catalog semantics”. A metric view separates measures, the calculations such as total revenue, from fields, the attributes you group and filter by. You define a measure once, and the query engine generates the right calculation for whatever grouping a user asks for at query time.

Blog_table.jpg

Metric views are defined in YAML and created with SQL or in Catalog Explorer on Databricks Runtime 16.4 or above.

Where does it fit?

The New Problem

The challenge appears when the Lakehouse starts producing data that an application also wants to use.

For example, Databricks may calculate:

  • Customer segments
  • Recommendations
  • ML predictions
  • Risk scores
  • Enriched customer profiles

This information may exist only in the Lakehouse.

But the application still needs to serve it quickly.

Traditionally, we might build another data movement process:



Metric View Data Flow Dashboard.pngDatabricks Introduced Lakebase_infographics 1 3.jpg

Now we have another synchronization pipeline to build, monitor, troubleshoot, and maintain.

This is where Lakebase becomes interesting.

 So, What Is Lakebase?

Lakebase is a fully managed PostgreSQL database integrated with the Databricks platform. It provides the familiar PostgreSQL experience for applications while bringing it closer to the Databricks Lakehouse and Unity Catalog. The important point is:Lakebase is not replacing the Lakehouse. They have different jobs.

Lakehouse

  • Processes and enriches data at scale
  • Supports analytics and BI
  • Develops ML/AI outputs
  • Handles large-scale data workloads

Lakebase

  • Serves low-latency application queries
  • Handles transactional workloads
  • Holds application state
  • Provides a PostgreSQL-based application backend

The distinction matters because a customer risk score may be computed from many records in the Lakehouse but retrieved one customer at a time by an application. Lakebase addresses that operational access pattern without asking the Lakehouse to behave like an application database.

Where Does It Fit?

A simple example:



Databricks Introduced Lakebase_infographics 2 3.jpg

Databricks can synchronize selected Unity Catalog tables into Lakebase. The application can then query the Postgres copy using a standard PostgreSQL driver, rather than directly querying the analytical Lakehouse.

For example, an application could retrieve an enriched customer profile: 

SELECT * FROM customer_profile_synced

WHERE customer_id = 12345;

The application gets the low-latency PostgreSQL experience, while the data can originate from the Lakehouse. The exact table name and schema depend on how the synced table is configured.

But Isn't Lakebase Just PostgreSQL?

Technically, Lakebase provides a PostgreSQL experience, and that is intentional. An application can use familiar SQL, drivers and development patterns.

The difference is integration.

With a traditional PostgreSQL database, your operational database and Databricks Lakehouse are typically separate platforms:




Databricks Introduced Lakebase_infographics 4 – 1 4.jpg

Databricks is bringing the operational PostgreSQL capability into the same broader platform.

Why Does This Matter Now?

 Applications are no longer consuming only transactional data. A service agent may need an up-to-date customer profile. A fraud workflow may need a calculated risk score. An AI agent may need to retain state while acting on information produced elsewhere in the platform.

Modern applications and AI agents increasingly need: Operational data + analytical insights + ML/AI results. Yet those elements often live in systems with different performance characteristics and refresh cycles. An insight is only useful in a live workflow if the application can retrieve it reliably and the team understands how fresh it is.

Lakebase gives applications a PostgreSQL-based operational layer while allowing them to work more closely with data produced by the Lakehouse. That is the real value: a clearer path from enriched data to application use, with transactional state handled where it belongs.

The Simple Takeaway

  • Lakebase is not the replacement for PostgreSQL deployment.
  • It is also not the replacement for the Lakehouse.
  • Instead, Databricks is bringing these two worlds closer together:
  • Lakehouse → understand and enrich the data
  • Lakebase → serve and operate on the data

For teams building applications around Lakehouse outputs, the architectural decision is no longer only where to calculate an insight. It is also how to make that insight available to the application, how current it must be and which system owns the subsequent transaction.

where a metric view sits · consumers as listed in the Databricks metric views documentation

A minimal example on the samples.tpch.orders sample table:

CREATE OR REPLACE VIEW main.sales.orders_metrics

WITH METRICS

LANGUAGE YAML

AS $$

version: 1.1

source: samples.tpch.orders

fields:

- name: order_month

expr: DATE_TRUNC('MONTH', source.o_orderdate)

- name: order_status

expr: source.o_orderstatus

synonyms: ['status', 'fulfillment status']

measures:

- name: total_revenue

expr: SUM(source.o_totalprice)

display_name: 'Total Revenue'

synonyms: ['revenue', 'sales']

$$

Anyone with SELECT can then query it, wrapping each measure in MEASURE():

SELECT order_month, MEASURE(total_revenue)

FROM main.sales.orders_metrics GROUP BY ALL ORDER BY order_month;

Group by order_status instead and you get revenue by status, with no new view. Display names and synonyms need YAML version 1.1 and Databricks Runtime 17.3 or above (YAML syntax reference).

But isn’t this just a Power BI semantic model?

They work at different layers. A BI semantic model serves one tool’s reports; a metric view lives in Unity Catalog, so one definition reaches AI/BI dashboards, Genie Agents, alerts, JDBC and ODBC clients, Excel and Google Sheets, under the same permissions and lineage as the rest of your data.

The two also work together: Power BI can query a metric view in DirectQuery mode or publish it as a semantic model (Private Preview), Tableau connects through Custom SQL, and Genie Code can import an existing Tableau or Power BI model as a metric view.

Know the trade-offs: metric views don’t support SELECT *, and they can’t be joined directly to other tables at query time, so you wrap the query in a CTE first.

Why does this matter now?

AI agents now ask the questions. When a user asks Genie for “sales by status”, synonyms connect “sales” to the right measure; Databricks notes that synonyms “are automatically imported to help Genie better discover and understand available fields”.

The model grew in 2026. Parameters became generally available on November 13 (Databricks Runtime 18.2 or above), and relationships between metric views entered Beta on October 30, so AI assistants and BI tools can read join paths from Unity Catalog “instead of inferring a join from column names”.

The simple takeaway: define each KPI once in Unity Catalog, query it everywhere, and add synonyms so Genie understands your users. Metric views complement your BI tool; they don’t replace it.

A shared foundation for business metrics

Databricks metric views bring measure definitions into Unity Catalog, giving dashboards, Genie, and AI agents a shared foundation for interpreting business metrics. For teams maintaining several versions of “revenue,” the practical starting point is to agree on the business rules, define the measure, and connect the tools that need it.

As a Databricks Silver Partner, iLink Digital helps enterprises build and govern Databricks data platforms, bringing together data engineering, analytics, AI, and Unity Catalog expertise. That foundation supports the broader goal behind metric views: making business data consistently understood and usable across teams. ilink-digital.com

Evaluating how metric views fit into your existing analytics environment? Talk to iLink’s Databricks experts about your data platform and governance priorities

Written by

Tushar Lanjewar

Tushar Lanjewar

Technical Architect at iLink Digital

Tushar Lanjewar is a data engineering and cloud technology professional with more than a decade of experience in IT. At iLink Digital, he specializes in Databricks and modern data platforms, with expertise in data engineering, Delta Lake, lakehouse architecture, and data modernization on Microsoft Azure. He has experience designing and implementing scalable data solutions using Databricks, with a focus on building governed, reliable, and analytics-ready data platforms.

Together,
let’s focus on real

Start The Conversation