On 30 October 2026, Databricks added a feature to its release notes with a plain title: relationships between metric views (Beta). You run an ALTER VIEW ... ADD CONSTRAINT ... RELATIONSHIP statement, and it records "join paths, cardinality, and join conditions so AI and BI tools pick the right path."
That sentence matters more to business analysts than most of this autumn's AI announcements. Here's why. The join between two business objects, and whether it's one-to-one or many-to-one, is where most of my report reconciliation time goes. It's where order revenue doubles. It's where a customer count quietly turns into a count of customer history rows. Until now that knowledge lived in a few places: the SQL a developer wrote, the data model diagram (if anyone kept it current) and the BA's data mapping document. Now it can live as metadata in the catalog, where an AI assistant reads it and uses it to build queries for people who will never see the SQL.
And the documentation says, in so many words, that nobody checks whether it's true.
This post walks through what shipped, what it changes for people who write requirements and sign off reports, and a small worked example on fictional Northstar Systems data with three checks I ran myself. You'll also find a sign-off sheet you can copy.
Why now: two announcements in one week
The Databricks release didn't land on its own. Four days earlier, on 26 October, Oracle used its AI World conference to announce a Business Semantic Layer for its Autonomous AI Lakehouse. Oracle says it "helps users and AI agents gain consistent business context to accurately query, reason over" enterprise data. InfoWorld's write-up describes models that capture dimensions, measures, hierarchies, calculations and KPIs, which feed Oracle's natural-language query tools. Oracle's own release says the capabilities "will be available within the next 12 months", so that one is a direction of travel, not something you can switch on today.
The Databricks piece is live (in Beta) right now. And it sits inside a month where Databricks shipped a run of related features. On 15 October its AI/BI release notes added import of Power BI .tmdl files to create metric views. On 22 October came bulk import, where its coding agent "can import up to 100 files at once as dashboards and metric views" from Power BI and Tableau. On 29 October, dashboard relationships went generally available.
Put those together and the direction is clear. Metric definitions and join rules are moving out of individual reports and into a shared layer that machines read. The vendors are converging on formats too: the Open Semantic Interchange project, which dbt Labs says has contributors from Snowflake, Salesforce, Databricks, dbt Labs and others, joined the Apache Incubator this summer as Apache Ossie and "defines a vendor-neutral format for expressing business metrics, dimensions, relationships."
There's evidence that the context layer is where agents go wrong. A VentureBeat Pulse survey fielded in August and published 5 October found that 64% of 130 respondents traced at least one confidently wrong agent answer to missing or inconsistent business context in the past six months. Two caveats from the article itself: the respondents are self-selected VentureBeat readers, not a random sample, and the survey didn't establish why teams with semantic layers reported more failures (78% against 37%). Better detection is one possible reading. I'd still take the 64% as a signal worth acting on.
What actually changed
Here's the feature, from the Databricks documentation on metric view relationships. A relationship is named metadata on a Unity Catalog metric view. It points from a source metric view to a target metric view and records two things: the cardinality and the join condition. The documentation's example looks like this:
ALTER VIEW main.sales.orders_mv ADD CONSTRAINT orders_customer
MANY TO ONE RELATIONSHIP TO main.sales.customers_mv
USING (customer_id);
Cardinality can be MANY TO ONE, ONE TO MANY, ONE TO ONE or MANY TO MANY. The join is either USING (columns) or an ON condition, which can't reference a measure or an aggregate. You can declare a self-join (employee to manager) and more than one path between the same two views (a flight's departure city and arrival city both point at the cities view).
Two things in the documentation are worth reading slowly.
First, how tools use it. "AI assistants and BI tools read the relationship from Unity Catalog and choose joins freely for each analysis." The relationship doesn't lock in one join. It tells the tool which joins are legal and what shape they have, and the tool decides per question. Databricks' dashboard-authoring agent reads relationships and adds the ones an analysis needs.
Second, what's checked. The page is blunt: "Databricks doesn't enforce relationships, check data against the declared cardinality." At creation time it validates the join condition the way it would validate a join's ON clause, so a column that doesn't resolve will fail. The data itself is never compared against the declared shape. The documentation also says a relationship, unlike a foreign key, has no requirement on the target. A foreign key needs a primary key or unique constraint on the other side. A relationship doesn't.
So you can declare MANY TO ONE to a customers view that has two rows for the same customer, and nothing will stop you. What the AI tools do with that mismatch isn't documented.
A few smaller limits from the same page that matter for change control:
- Relationships can only be declared with
ALTER VIEW, not in the metric view's YAML definition. If your team reviews metric views as YAML in pull requests, the relationship sits outside that review unless someone puts the SQL in the same change. - Renaming a metric view doesn't update an
ONcondition that names the old view. You drop and re-add. - A target view doesn't list its inbound relationships. To find everything that points at
customers_mv, you check each source. - Relationships aren't in the REST API or SDKs yet. SQL only.
What it means for the work
Picture a Monday sign-off meeting at Northstar Systems, a fictional B2B software company. The data team has published an orders metric view and a customers metric view, declared orders MANY TO ONE customers, and pointed the company's AI assistant at both. A sales director types "October revenue by region." The assistant joins the views using the declared relationship, groups by region and returns a table. Nobody in the room wrote that SQL. Nobody in the room will read it.
What used to be a developer's private decision inside one report is now a shared claim the whole company's question-answering depends on. "Each order belongs to exactly one customer row" is a statement about the business and about the data load. That makes it a requirement. It has an owner, an acceptance test and a way to break.
I've written before that you should name the grain first, a lesson I took from a reader called ontomato: "one row = one order line." A relationship declaration is a grain statement for two tables at once. MANY TO ONE says: one row on the target side per key. If the person writing that line doesn't know the target's grain, the line is a guess.
panditshivam made a related point in a post on defining revenue for an SQL agent: a metric definition an agent will use has to state its grain, which statuses count, how joins behave and what the empty-set result is. Metric views cover the measure. Relationships now cover the join behaviour. What neither covers is whether the data agrees.
Worked example: Northstar's October revenue
Here's the fixture. All of it is fictional. One row in orders is one order. One row in customers is supposed to be one customer, but Pine Street Dental (C-02) moved from East to South on 10 October and the history load kept both rows. Order O-1006 belongs to a customer, C-09, who hasn't arrived in the customer table yet.
-- Northstar Systems (fictional). One row in orders = one order.
CREATE TABLE orders (order_id TEXT PRIMARY KEY, customer_id TEXT, order_date TEXT, net_amount REAL);
INSERT INTO orders VALUES
('O-1001','C-01','2026-10-01',1200.00),
('O-1002','C-02','2026-10-03', 450.00),
('O-1003','C-03','2026-10-07', 980.00),
('O-1004','C-02','2026-10-12', 300.00),
('O-1005','C-04','2026-10-19', 760.00),
('O-1006','C-09','2026-10-28', 210.00);
CREATE TABLE customers (customer_id TEXT, customer_name TEXT, region TEXT, valid_from TEXT);
INSERT INTO customers VALUES
('C-01','Harbor Labs','East','2025-01-01'),
('C-02','Pine Street Dental','East','2025-03-01'),
('C-02','Pine Street Dental','South','2026-10-10'),
('C-03','Brightwell Foods','West','2025-06-01'),
('C-04','Kestrel Freight','South','2026-02-01');
The declared relationship is the one from the documentation: orders MANY TO ONE customers USING (customer_id).
I write each check as a query that returns rows only when something is wrong. That habit came from Manuel Diaz, who commented on my Dev.to post on SQL checks before UAT sign-off. An empty result means pass. Anything else is a finding with the evidence attached.
Check 1: is the "one" side actually one?
SELECT 'orders_customer' AS relationship, customer_id, COUNT(*) AS rows_on_one_side
FROM customers
GROUP BY customer_id
HAVING COUNT(*) > 1;
Output (run in SQLite 3.53.1 through Python's sqlite3 module):
relationship customer_id rows_on_one_side
--------------- ----------- ----------------
orders_customer C-02 2
The declaration says many-to-one. The data says C-02 is many-to-many. This is the check the platform doesn't run.
Check 2: orphans on the source side
SELECT o.order_id, o.customer_id, o.net_amount
FROM orders o
LEFT JOIN customers c ON c.customer_id = o.customer_id
WHERE c.customer_id IS NULL;
order_id customer_id net_amount
-------- ----------- ----------
O-1006 C-09 210.0
A relationship says nothing about whether every order has a customer. If the agent builds an inner join, O-1006's $210 disappears from "revenue by region" without a trace. If it builds a left join, you get a region called NULL. Either could be right. The requirement has to say which.
Check 3: control total before and after the join
Alex Shev, in a comment on control totals, argued for comparing a known total at every step where rows can multiply or vanish. Here's that applied to the declared join:
WITH base AS (SELECT SUM(net_amount) AS revenue, COUNT(*) AS n FROM orders),
joined AS (SELECT SUM(o.net_amount) AS revenue, COUNT(*) AS n
FROM orders o LEFT JOIN customers c ON c.customer_id = o.customer_id)
SELECT base.revenue AS revenue_base, joined.revenue AS revenue_after_join,
base.n AS rows_base, joined.n AS rows_after_join,
ROUND(joined.revenue - base.revenue, 2) AS inflation
FROM base, joined
WHERE base.revenue <> joined.revenue OR base.n <> joined.n;
revenue_base revenue_after_join rows_base rows_after_join inflation
------------ ------------------ --------- --------------- ---------
3900.0 4650.0 6 8 750.0
Six orders became eight rows, and $3,900 became $4,650. The $750 is Pine Street Dental's two orders ($450 + $300), counted once for each of its customer rows. Here's what the sales director would see:
region revenue
------------- -------
(no customer) 210.0
East 1950.0
South 1510.0
West 980.0
Both of C-02's orders show up in East and in South. The total is 19% too high, and nothing on the screen looks broken. That's the kind of number that survives a meeting.
The fix is a business decision
There are two reasonable fixes, and the SQL doesn't pick between them. A person does.
Option A joins orders to the customer's current row. Option B joins each order to the customer row that was valid on the order date. I built a versioned view with a valid_to column (the next row's valid_from, or 9999-12-31), then a current-row view on top. Check 1 against the current view, and a per-order fan-out check against the point-in-time join, both returned no rows. Then the two answers:
--- Revenue by region, Option A (current region)
region revenue
------------- -------
(no customer) 210.0
East 1200.0
South 1510.0
West 980.0
--- Revenue by region, Option B (region on the order date)
region revenue
------------- -------
(no customer) 210.0
East 1650.0
South 1060.0
West 980.0
Both total $3,900. They disagree by $450 on East and South, because Option A credits O-1002 (placed on 3 October, while Pine Street was still in East) to South.
Which is right depends on the question. If regional managers are paid on what their region booked that month, Option B is right and Option A moves $450 of East's commission to South. If the question is "where is our revenue coming from today," Option A is fine. In Databricks terms, Option B is an ON condition with a date range in it, and the documentation allows that, since the condition only has to be a deterministic boolean over both views' columns.
This is the part I keep coming back to. The relationship line looks like plumbing. It's actually where "which region does this order belong to" gets decided, for every question anyone ever asks the agent. Somebody should write that decision down in words a sales director can read and agree to.
The sign-off sheet
Here's the artifact I'd attach to any change that adds or alters a declared relationship. One row per relationship. It's filled in for Northstar so you can see the level of detail I mean.
| Field | Northstar orders_customer |
|---|---|
| Relationship name | orders_customer |
| Source view and its grain | orders_mv. One row = one order. |
| Target view and its grain | customers_mv. Intended: one row = one customer. Actual today: one row = one customer version. |
| Declared cardinality | MANY TO ONE |
| Join condition | Proposed: ON o.customer_id = c.customer_id AND o.order_date >= c.valid_from AND o.order_date < c.valid_to |
| Business rule in plain words | "An order belongs to the region the customer was in on the order date." |
| Rule owner (who can change it) | Sales operations lead (fictional role) |
| Orphan behaviour | Orders with no matching customer are kept and shown as "(no customer)". Never dropped. |
| Check 1 (one side is one) | Query attached. Must return 0 rows. |
| Check 2 (orphans) | Query attached. Rows allowed, but count and amount reported each load. |
| Check 3 (control total) | Total before join = total after join, to the cent. |
| When to rerun | Every customer history load, every rename of either view, every change to the condition |
| Known questions this changes | Revenue by region, customer count by region, average order value by region |
| UAT case IDs | Trace to the traceability matrix |
| Signed off by / date |
A few notes on using it.
The "actual today" line under target grain is the one people skip. Writing the intended grain is easy. Writing what the table holds this week is what catches the C-02 problem before the agent does.
"Orphan behaviour" needs a decision even though the relationship syntax has nowhere to put it. That's panditshivam's point about the empty set and join behaviour again: if it isn't written down, the tool picks, and it might pick differently next month.
"Known questions this changes" is how you find your UAT cases. If a relationship feeds revenue by region, that's a question you test with a known answer, the same way you'd test a report. I described the golden-set approach for agents in my video on AI agent testing for business analysts: fixed questions, known answers, run more than once. Relationship checks belong in that same set.
Impact checklist: what to change in requirements, UAT and report sign-off
If your company is adopting declared relationships, or any semantic layer that AI tools read (Oracle's when it ships, a dbt semantic model, an Ossie export), here's what I'd change in each part of the BA's work.
In requirements
- For every report or agent use case that combines two business objects, add a line stating the cardinality in business words. "Each order has exactly one customer at the time it's placed." If nobody can say it, that's an open question, not a detail.
- State orphan behaviour explicitly. Kept, dropped or flagged.
- For any dimension with history (customers, products, employees, price lists), say whether the report uses current values or values as at the transaction date. This is the decision Option A vs Option B forces.
- Record the relationship name in the data mapping. My data mapping template has a column for join logic; put the relationship name and cardinality there so the mapping and the catalog can be compared.
In UAT
- Add the three checks as test cases with expected result "0 rows" (or a reported count for orphans).
- Test at least one agent question per relationship against a known answer built by hand. Revenue by region with a hand-calculated total.
- Include a boundary record on purpose. A customer who changed region mid-period is the Northstar case; a product that changed category works too. Alex Shev's list of control totals, idempotent reruns and boundary records is a good prompt here.
- If the relationship was imported (from a Power BI
.tmdlfile, for instance), test it again. An import carries the declaration across. It doesn't carry across whatever made it true in the old model.
In report and agent sign-off
- Don't sign off a dashboard or agent answer that uses a relationship until its sign-off sheet row has a date on it.
- Ask who gets told when the checks fail after go-live. The checks have to run on every load, because the data that made them pass in UAT will change.
- Check that the relationship SQL is in the same change request as the metric view YAML. Since relationships can't live in the YAML, they're easy to leave out of review.
My Substack post on UAT plans covers where test cases like these sit in a plan, and the UAT plan template has a data checks section they fit into.
My take
Here's the part you might disagree with. I think a declared relationship should be treated as a business requirement with a named business owner, and a BA should be able to block an agent go-live on a relationship whose checks haven't been run. It shouldn't be a data engineering detail that's reviewed for syntax.
The reasonable objection is that this slows things down, and that data engineers understand joins better than most BAs. Both are true. But the thing at stake is the meaning of the answer. "Revenue by region" with Option A and Option B are two different business rules that happen to be written in SQL. The engineer can write either. Only the business can say which one it meant, and the BA is the person whose job is getting that written down and tested.
The other objection: "The vendor will add validation soon, so why build process around a Beta gap?" Maybe they will. Even then, a platform can tell you C-02 has two rows. It can't tell you whether sales operations wants O-1002 credited to East. That choice stays with people.
A declared join is a promise about your data that the platform won't check, so somebody in the room has to.
What the method misses
A sharp commenter would raise a few things, so here they are up front.
The checks pass today and fail on Thursday. Cardinality is a property of this week's data. C-02's second row arrived with a history load. If the checks only run in UAT, they prove nothing about next month. Schedule them after every load of either side. Databricks made data quality anomaly detection generally available on 29 October for table freshness and completeness, but that's a different test from cardinality, so don't assume it covers this.
MANY TO MANY isn't automatically safe. You might think declaring MANY TO MANY when you're unsure is the cautious choice. It only tells the tool to expect fan-out. Whether the tool then aggregates correctly (summing each order once) is a separate behaviour, and I haven't seen it documented.
I didn't test this on Databricks. Everything above ran in SQLite on a six-row fixture. I haven't observed how Genie or the dashboard agent behaves when a declared MANY TO ONE is false in the data, and the documentation doesn't say. My example shows what a naive join does. A tool might be smarter, or it might not. Testing that is exactly the UAT case I'm recommending you write.
Point-in-time joins have their own edge cases. Option B uses order_date >= valid_from AND order_date < valid_to. If two history rows share a valid_from, or a load leaves a gap between versions, you get fan-out or orphans again. Run Check 1 on the versioned view grouped by key and valid_from, and a gap check, before trusting it.
Composite keys. Northstar uses a single customer_id. If your key is (customer_id, company_code), Check 1 has to group by both columns. A grouping on one column will report false duplicates, or worse, hide real ones.
What I'd do on Monday
- Ask the data team for a list of every declared relationship, or every join your AI assistant or semantic layer is allowed to use. On Databricks,
DESCRIBE TABLE EXTENDEDon each source metric view shows them. Remember the target doesn't list inbound ones. - For the three relationships behind your most-used revenue or headcount numbers, write the grain of each side in one sentence. Note where "intended" and "actual" differ.
- Run the three checks against each. Use the queries above, or the patterns in my data validation checks SQL file.
- For any dimension with history, get a written answer to "current value or value at transaction date?" from the person who owns the number.
- Fill one row of the sign-off sheet per relationship and attach it to the next change request that touches them.
- Add one agent question per relationship to your golden set, with a hand-calculated answer.
If you're writing requirements for an agent from scratch, my agent-ready requirements checklist has a section on data definitions where these lines belong.
Watch: finding the gap when numbers don't match
The fan-out in check 3 is the same failure I walk through in my video on reconciliation, which covers definitions, calendar and time zone, grain and fan-out, and orphans.
Video: "Dashboard Numbers Don't Match? Find the Gap in SQL", Prachit Parikh. More on my YouTube channel.
If you want a full worked reconciliation with fixture data, the revenue reconciliation example in my toolkit is the long version of Check 3.
Discussion questions
- Who owns the cardinality line at your company today: data engineering, BI, the BA, or nobody in particular?
- For your customer or product dimension, does reporting use current values or values at transaction date? Is that written down anywhere a stakeholder would see?
- Would you block an AI assistant go-live on an untested relationship, or ship and monitor?
- Has a vendor import (Power BI to another tool, or the reverse) ever changed a join's behaviour on you without anyone noticing?
Comment prompt: Tell me about the worst fan-out you've found in a "trusted" number, and how long it had been live before someone spotted it. If you've tested how an AI assistant behaves when a declared relationship is wrong in the data, I'd really like to hear what it did.
References
- Databricks, Platform release notes, October 2026: "Relationships between metric views (Beta)", 30 Oct 2026; data quality anomaly detection GA, 29 Oct 2026.
- Databricks, Relationships between metric views (documentation, Beta).
- Databricks, AI/BI and Genie One release notes 2026:
.tmdlimport (15 Oct), bulk import from Power BI and Tableau (22 Oct), dashboard relationships GA (29 Oct). - Oracle, Oracle advances Autonomous AI Lakehouse with Business Semantic Layer and expanded support for Iceberg data, press release, 26 Oct 2026.
- Anirban Ghoshal, Oracle adds a semantic layer to ground AI agents in the business context, InfoWorld, 26 Oct 2026.
- VentureBeat, Agentic context layers: 64% of enterprises traced a confidently wrong AI agent answer to problems in their own company data, 5 Oct 2026.
- dbt Labs, OSI is now Apache Ossie (last edited 13 Jul 2026).
Reader lessons used: ontomato, name the grain first; panditshivam, defining revenue for an SQL agent; Alex Shev, control totals, idempotent reruns and boundary records; Manuel Diaz, checks that return rows only when something is wrong (comment on my Dev.to post).
More of my work, including worked case studies, is on my portfolio page.
About me
I'm Prachit Parikh, a business analyst. I turn what stakeholders ask for into requirements a team can test, check the data with SQL, and see changes through UAT. I keep free templates, including the SQL data validation checks and traceability matrix that pair with the sign-off sheet above, in my BA Toolkit on GitHub, and I make short animated explainers on YouTube. Besides this site, I write on Substack, Medium, Hashnode, Dev.to, Blogger and WordPress, and I answer questions on Quora. You can also find me on LinkedIn, Bluesky, Kaggle, Credly, Crunchbase and Gravatar. Everything is collected on my website and my profile hub.