AIToday
Large Language ModelsDatabricks AI BlogPublished: Dec 4, 2026, 04:00 JST

Databricks adds query-time joins to Unity Catalog Semantics

Send on LINE
Databricks adds query-time joins to Unity Catalog Semantics

3 Key Points

  1. What happened

    Databricks added query-time joins and relationship constraints to Unity Catalog Semantics, letting agents join metric views with other metric views, tables, and views in ordinary SQL while the engine prevents join-induced duplication.

  2. Why it matters

    Teams can govern metrics independently and still answer cross-team questions without building one giant semantic model, which is how agents avoid wrong aggregates like a 900 sales total that should be 300.

WHO IT HITSData modelers and analytics engineers who define business metrics, plus BI tool vendors integrating with Unity Catalog, can now let agents combine separately owned metrics without pre-building a unified semantic model.

Ask AI

Ask the AI about this article. Questions and answers are published on this page

Context & Analysis

Databricks released Unity Catalog metric views in April as a SQL-first way to define and govern business metrics. Many customers have since adopted metric views as the foundation of their semantic layer, according to the company. The new features extend that foundation rather than replacing it.

The design addresses a specific SQL pitfall. When sales and support tickets are joined on region, a region with multiple sales and multiple tickets produces duplicated rows, a problem known as a chasm trap. Databricks says its engine protects measures so each original source row contributes at most once per group, even across many-to-many joins. In the company's example, a regular SUM over joined rows returns 900 for East sales, while MEASURE() correctly returns 300.

Relationship constraints complement joins declared in a metric view's YAML. A definition-time join fixes the path the engine must use, while a relationship constraint records possible joins and defers the choice to the agent or user at query time. That matters for cases such as role-playing dimensions like shipping city and billing city, or self-relationships between employees and managers. Databricks says Genie and AI/BI Dashboards can already use these relationships, and it has started working on BI vendor integrations, with announcements planned for the near future.

FAQ
How is a metric view different from a traditional semantic model?
A metric view is a Unity Catalog view that behaves like a regular SQL view but adds governed measures. A traditional semantic model selects which tables to join based on requested measures and dimensions, so the underlying rows can change from one question to the next.
Do I need a primary key for MEASURE() to work across joins?
No. Each measure carries the identity of its source rows, and MEASURE() aggregates over those rows without duplication regardless of how the query joins them. Two source rows with identical values remain two rows; only join-introduced duplication is removed.
What is the difference between definition-time joins in YAML, relationships, and query-time joins?
A definition-time join in YAML fixes the modeling path at definition time, which suits star and snowflake schemas. A relationship is metadata recording how two metric views relate without executing a join. A query-time join composes metric views in SQL for one question.
Databricks AI BlogRead Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Related Articles

Next article71.6% of Japanese firms lack AI drivers, IPA survey finds