AI Agent News/stories/databricks-adds-query-time-joins-and-relationship-constraints-for-metric-views.md

Infrastructure

Databricks adds query-time joins and relationship constraints for metric views

Databricks has put two Unity Catalog Semantics features into Beta: query-time joins, which let metric views be combined in plain SQL, and relationship constraints, which let agents and BI tools find how metric views connect. Together they let agents answer questions across independently governed metrics without building a new combined semantic model.

Source: www.databricks.com/blog/beyond-semantic-model-composable-metrics-ai-agents

Query-time joins let metric views join with tables, views and other metric views in ordinary SQL. The SQL engine stops join-induced duplication from inflating measures, including across many-to-many joins, so MEASURE() returns correct totals. In the Databricks example, sales for the East region come to 300 rather than the 900 a plain SUM over the joined rows would give.

Relationship constraints are named, directional links between metric views, declared with a cardinality of one-to-one, many-to-one or many-to-many and a flexible join condition. They show up in DESCRIBE TABLE EXTENDED and in information_schema.table_constraints, so a tool can find that two metric views connect through a shared customer view and write the join itself. Definition-time joins in YAML still fix a join path, while relationships leave the choice to query time.

Databricks says Genie, Genie Agents and AI/BI Dashboards can use both features, and that integrations with some BI vendors are in progress. Query-time joins and relationship constraints are in Beta on Databricks Runtime 19 and above and on SQL warehouses.

Why it matters if you build agents

Agents can combine metrics owned by different teams without building a new semantic model for each question, as long as those metric views are defined in Unity Catalog. Hand-written deduplication or semi-join workarounds for chasm traps are no longer needed when measures are evaluated with MEASURE(). Both features are Beta, so test them on Runtime 19 or SQL warehouses before relying on them.

Get stories like this every weekday

One short email with the day's agent tooling news.

Subscribe