Skip to content
DigitalNeuron
Tools & products

Databricks Adds Query-Time Joins and Relationship Constraints to Unity Catalog Semantics

Databricks announced two Unity Catalog Semantics features letting AI agents join and combine independently governed metric views directly in SQL.

By DigitalNeuron Desk2 min read

Quick answer

What new features did Databricks announce for composing governed metrics across AI agents and BI tools?

Databricks announced query-time joins and relationship constraints, two Unity Catalog Semantics features now in Beta. They let metric views be joined with tables, views, and other metric views in SQL while preventing join-induced duplication, and let data modelers define discoverable relationships between metric views for agents and BI tools.

Key takeaways

  • Databricks introduced query-time joins and relationship constraints in Unity Catalog Semantics, both now in Beta.
  • Query-time joins let metric views be joined with tables, views, or other metric views in SQL while the engine prevents measures from being duplicated by the join.
  • Relationship constraints let data modelers define relationships between metric views in Unity Catalog, which agents and BI tools, including those powered by Genie, can discover and use to generate joins.
  • Databricks says the goal is to let AI agents answer business questions spanning independently governed metrics without requiring modelers to build monolithic or overlapping semantic models.
  • Databricks states it released Unity Catalog metric views in April and that many customers have since adopted them as the foundation of their semantic layer.

Databricks announced two new capabilities in Unity Catalog Semantics designed to let AI agents and BI tools combine independently governed business metrics directly in SQL. The company says query-time joins and relationship constraints are both now in Beta.

What Databricks announced

According to Databricks, query-time joins let metric views be joined with ordinary tables, views, or other metric views in standard SQL. The company says its SQL engine protects measures from join-induced duplication, including across many-to-many joins, so metrics and dimensions from multiple data sources can be combined without producing incorrect totals.

The second feature, relationship constraints, lets data modelers define relationships between metric views directly in Unity Catalog using SQL informational constraints, Databricks says. The company states that agents and BI tools, including those powered by Genie, can discover these relationships and use them to generate joins across metric views that different teams govern independently.

The problem Databricks says it addresses

Databricks says that joining metrics from separate data sources in ordinary SQL can produce incorrect results, a problem it refers to as a chasm trap. The company gives an example: joining a sales table and a support ticket table on region can duplicate rows if a region has multiple sales and multiple tickets, inflating aggregate totals.

Databricks says metric views, which it first released in April as part of Unity Catalog, address this by separating two kinds of columns: fields, which behave like normal SQL columns usable for filtering, grouping, and joining; and measures, which carry an aggregate calculation along with the identity of the source rows being aggregated so the engine can avoid double-counting. Measures are evaluated using a function called MEASURE(), which the company says can be used in the SELECT list, HAVING, ORDER BY, subqueries, and CTEs.

In an example provided by Databricks, joining a sales metric view with a support tickets metric view on region produces six joined rows for a region with two sales and three tickets. Databricks says a standard SUM() over those joined rows would incorrectly return totals inflated by the join, while MEASURE() returns the correct original totals for each metric because each source row contributes only once per group. The company says this duplication protection holds for one-to-many, many-to-one, and many-to-many joins, and extends to outer joins, HAVING clauses on evaluated measures, and EXISTS and IN subqueries.

Why Databricks built this

Databricks says traditional semantic models work well for business intelligence use cases where the scope of analysis is known in advance, but AI agents increasingly need to answer questions that span metrics defined and governed independently by different teams, such as sales, support tickets, and product usage. The company says anticipating every combination of metrics and dimensions at modeling time would otherwise require either unwieldy semantic models or redundant ones.

Databricks states that these two features let data modelers govern metric and relationship definitions centrally in Unity Catalog, while agents and BI tools combine them at query time to answer new business questions, without requiring a single monolithic semantic model.

Source: Databricks Blog, "Beyond the semantic model: composable metrics for AI agents," published December 3, 2026.

Frequently asked questions

What are query-time joins?
Databricks says query-time joins allow metric views to be joined with tables, views, or other metric views directly in SQL, with the engine protecting measures from join-induced duplication even across many-to-many joins.
What are relationship constraints?
According to Databricks, relationship constraints let data modelers define relationships between metric views in Unity Catalog using SQL informational constraints, so agents and BI tools can discover and use those relationships to generate joins.
Why did Databricks build these features?
Databricks says AI agents increasingly need to answer questions spanning metrics that different teams govern independently, and that anticipating every metric and dimension combination in advance would require unwieldy or redundant semantic models.
Are these features generally available?
Databricks states both query-time joins and relationship constraints are currently in Beta.

Sources

  1. Beyond the semantic model: composable metrics for AI agents | Databricks Blog — Databricks
Tagsdatabricksunity-catalogai-agentssemantic-layersqlmetric-viewsbusiness-intelligence

Related reading

Databricks Brings Unity Catalog Metric Views to Power BI

Databricks announced Publish to Power BI, a feature that connects Unity Catalog metric views directly to Power BI semantic models, so metric definitions set in Databricks appear in Power BI as tables, columns, and DAX measures. The company says this keeps Power BI reports, AI/BI dashboards, and Genie aligned on the same governed numbers. It is available in private preview.

3 min read