Metric drift is the tax you're paying on every dashboard you haven't audited
Same metric name, three numbers, one Monday morning. A concrete audit against your warehouse query log, and why data catalogs never fixed this.
Three numbers, one word, one company.
On the executive dashboard, active_customers is 4,812. On the ops dashboard, active_customers is 5,104. In the AI Q&A tool that the head of growth started using last month, active_customers is 4,987. And in the CSV a VP later exported to a board deck, it read 5,241.
Nobody is lying. Nobody has a bug. Nobody has stale data. Every one of those queries returned the right answer for the SQL it actually ran. The problem is that “the SQL it actually ran” is different SQL in four places, and everybody thought they were asking the same question.
This is metric drift. It is the largest hidden tax on trust in every BI stack I have ever audited, and it is almost invisible until the quarter it lands on the CFO’s desk. I want to define it precisely, argue that the industry has been trying to fix the wrong side of it for a decade, and give you a query you can run against your own warehouse this week to score the drift you already have.
What metric drift actually is
Metric drift is the divergence of the implementation of a named business metric across the artifacts that use it. Same name, different SQL. It has three usual causes:
- Time asymmetry. Analyst A defines
active_usersin Q2 2023. Analyst B definesactive_usersin Q4 2024. Neither of them saw the other’s definition. They both filed it inside a dashboard, not inside a shared definitional layer. - Semantic drift. Somewhere between the two definitions, the business changed its mind about what “active” meant. Nobody wrote the change down. The old dashboards kept running.
- Local expedience. A VP asked for a number by end of day. The analyst copy-pasted the closest query, changed the
WHEREto fit the ask, saved it, and shipped it. That is now a fourth definition ofrevenue.
The tell is depressingly consistent across companies: three definitions of revenue that all agree within 2%, and one that disagrees by 12%. The one that disagrees is usually the one the executive team quotes back to the board.
In the mid-sized companies I have audited - call it a couple hundred people and dozens of dashboards - I commonly see between four and nine distinct definitions of the top ten business metrics. The worst engagement I ever walked into had twenty-three definitions of mrr, spread across Looker, three Redash instances, two dbt projects, and a Google Sheet that a board deck was still pulling from. Your numbers will vary. The order of magnitude will not.
Why the industry solutions have not fixed this
The default industry answer to metric drift is a data catalog. Buy a catalog, document your metrics, mark the “official” one, and expect people to check the catalog before shipping.
I disagree with that framing, and I want to be blunt about the reason: data catalogs describe metrics, but the number rendered on your dashboard is the SQL, not the description. The description in the wiki is a shadow of the definition, and the shadow does not get executed at query time. Users trust the number, not the paragraph next to the number.
“Certified dashboards” have the same flaw. Certification is a label attached to a piece of SQL that could be edited a day later by anyone with edit access. In a low-drift org, certification looks like it works because there is no drift to certify around. In a real org, the certified dashboard sits in a folder of uncertified ones, and the uncertified one is the one the VP screenshots into a Slack channel.
The dbt Semantic Layer, LookML, and Cube get closer - they force at least one canonical definition - but they only govern the tools that call them at query time. Every Tableau workbook, every Superset SQL Lab query, every notebook, every ad-hoc CSV export in your org is its own truth, and none of them go through your semantic layer. Governance you can route around is not governance; it is a suggestion.
The fix has to be architectural, not curatorial. But before we get to what the fix looks like, let’s measure the problem.
The audit you can run tomorrow
Almost every warehouse worth using logs the queries that ran against it. In ClickHouse it is system.query_log. In Snowflake it is SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY. In BigQuery it is INFORMATION_SCHEMA.JOBS_BY_PROJECT. In Postgres, turn on pg_stat_statements and you have the same substrate.
You do not need a data catalog or a lineage vendor to detect drift. You need to ask a single question of your query log: for the top N metric names that people write into SQL as column aliases, how many distinct query shapes are producing them?
Here is a first-cut audit against ClickHouse. It is a regex heuristic, not a semantic parse, so treat the output as a triage list rather than a verdict:
WITH query_metrics AS (
SELECT
normalized_query_hash AS shape,
arrayJoin(
extractAll(lower(query), '\\bas\\s+([a-z_][a-z0-9_]{3,})')
) AS metric_name
FROM system.query_log
WHERE event_time > now() - INTERVAL 90 DAY
AND type = 'QueryFinish'
AND is_initial_query
AND user NOT LIKE 'sys_%'
)
SELECT
metric_name,
count(DISTINCT shape) AS distinct_definitions,
count() AS executions,
round(count() / count(DISTINCT shape)) AS avg_reuse
FROM query_metrics
WHERE metric_name NOT IN
('id', 'ts', 'total', 'value', 'count', 'name', 'date', 'day', 'user_id', 'row')
GROUP BY metric_name
HAVING distinct_definitions > 1
AND executions > 20
ORDER BY distinct_definitions DESC, executions DESC
LIMIT 25;
The Snowflake equivalent lives in QUERY_HISTORY and swaps normalized_query_hash for a hash of QUERY_TEXT with literals stripped by REGEXP_REPLACE. If you know your warehouse, port the idea in half an hour - the shape of the check is the same everywhere.
Two blind spots to be honest about before you run this.
First, false positives. The pattern \bas\s+… matches table, CTE, and subquery aliases too - FROM customers AS cust, FROM (SELECT …) AS staging_users, join aliases, the lot - and in a warehouse with meaningful subquery use these structural aliases will vastly outnumber real metric aliases in the result. You need a denylist pass and thirty minutes of manual triage before the top of this list is trustworthy. The naive query is a starting point, not a report.
Second, false negatives - the mirror-image problem, and the one a data engineer will spot first. If analyst A wrote AS active_users and analyst B wrote AS active_user_count, the query reports zero drift on “active users” when there are really two definitions. Feed your business glossary in as a seed list of aliases (active_users, active_user_count, mau, weekly_active, …) and rerun grouped by the glossary term. The delta between the naive score and the glossary-seeded one is your real drift score.
What you are then looking for:
- Any metric name in your top-twenty business glossary with
distinct_definitions > 1. That is drift. Investigate it before somebody else does. - A metric with both high
executionsand highdistinct_definitions. That is drift with blast radius. Fix that one first. - A metric that resolves to a single shape but the shape references literals like
WHERE region = 'US'. That is a hardcoded assumption that will silently ship next quarter’s wrong answer the moment the business expands.
The number that comes out of this query is your drift score for that name. Track it over time. A metric whose drift score is 1 and stays at 1 is under control. A metric whose drift score climbs from 1 to 4 over two quarters is an incident waiting to be discovered by an executive.
What a real fix looks like
You cannot solve this by writing more docs. You solve it by making sure there is exactly one place where a metric is defined and every rendering of it goes through that place. That is what a semantic layer is supposed to be - but only if it is enforced by the query path, not by discipline.
A semantic layer that lives outside the query is a suggestion. A semantic layer that lives inside the query is a definition. That distinction matters more than the vendor category names suggest.
Concretely, the properties I look for on any stack that claims to have solved metric drift:
- The metric definition is code, in version control, reviewed via PR. Not a UI form. A UI form has no diff, no reviewer, and no rollback. A YAML file in a git repo has all three, and the PR discussion is where the “what does ‘active’ mean” conversation actually happens.
- Every rendered number is inspectable back to the SQL that produced it, in place. Not “click through to the catalog page”. Hover, see the SQL, see the freshness timestamp, see the tests that ran, see the upstream columns - attached to the number itself. If the BI tool renders the number and the definition lives elsewhere, drift is a matter of time.
- The SQL IDE and the dashboard tool share the metric. If your analysts write ad-hoc SQL that does not route through the semantic layer, you are guaranteed a fourth definition of MRR by the next board meeting. The mechanism that closes this without breaking analyst workflow is straightforward: the ad-hoc IDE compiles user SQL against the same YAML metric definitions the dashboards use, so
SELECT active_customers FROM metrics.corein a scratch query resolves through the same compiler that renders the exec dashboard. Bypassing the semantic layer then becomes strictly more work than going through it, and analysts optimize for less work. - Column-level lineage is always on, not a feature you navigate to. You should be able to answer “which upstream columns did this number come from?” without switching tools or waiting for a nightly crawl to finish.
We built Goni around exactly those properties, which is why we care about this problem in public. But you do not need Goni to run the audit. Run it. Look at the number. If your top-twenty metrics have an average drift score above two, you have a trust problem no amount of catalog documentation is going to solve - and you will feel it the quarter it lands on the CFO’s desk, and by then the wiki does not help.