dbt semantic layer on BigQuery: moving metric logic out of the BI tool

The dbt semantic layer on BigQuery solves a common problem. Finance reports one revenue figure and marketing reports another. Both are right inside their own dashboard, because each dashboard calculates revenue in its own way. It is one of the data problems nobody admits to in meetings. Moving the metric logic out of the BI tool and into dbt, the tool many data teams use to prepare data in BigQuery for reports, turns the two figures into one.
Signs your metric logic is stuck in dashboards
There are four signs that your metric logic is stuck in dashboards:
- The same metric shows different numbers in different reports.
- Calculated fields are copied from one dashboard to the next.
- A fix in one report is missing in the others.
- Analysts rebuild the logic in their own SQL, each in a slightly different way.
There is a newer reason as well. AI assistants and notebooks read the raw tables in BigQuery. They usually do not see the definitions that only exist in the BI tool. Ask the AI assistant your team uses for the revenue, and it calculates the figure in its own way.
What moves into dbt and what stays in the BI tool
Four things move into dbt:
- How each metric is calculated, for example that revenue is orders minus returns, without VAT.
- How tables are linked, for example which order belongs to which customer.
- Which time periods are used, for example whether a week starts on Monday or on Sunday.
- Which filters apply, for example that test orders do not count.
What stays in the BI tool is how the figures look: the layout, the charts and the option to click through the data. A useful rule: if a number has to hold up in a board meeting, the calculation behind it does not belong in a dashboard.
Once the calculations are in dbt, every dashboard, notebook and AI assistant that is connected to the semantic layer uses the same ones. When finance changes how revenue is calculated, the change is made once, in dbt. The next morning, every report shows the new figure. With dbt on BigQuery, the calculations are stored as code, so each change can be checked before it goes live.
Is a dbt semantic layer worth it next to LookML?
Looker is Google’s tool for building dashboards and reports. In Looker, metrics are defined in LookML, its own modelling language. LookML is already a semantic layer. If Looker is the only tool that reads your metrics, keeping the definitions there is often enough. A second layer would only add work.
That changes when several tools read the same metrics. Many notebooks, spreadsheets and AI assistants do not read LookML. One definition in dbt then avoids keeping two versions in sync. A semantic layer for business intelligence earns its place where more than one tool needs the same answer. The question usually comes up when business intelligence grows beyond a single tool.
Where dbt on BigQuery setups break
Moving the calculations into dbt does not solve everything on its own. The way dbt and BigQuery are set up around them has to be right as well. Four problems come back in many setups:
- Metrics are defined before the data underneath them is in its final shape. Every time that data is restructured, a metric breaks.
- No one owns a metric. Nobody can approve a change, so changes stop or happen without review.
- The data is not split up, for example by day. Every metric query then searches far more data than it needs, and BigQuery costs rise without anyone noticing.
- The inputs of a metric are not tested. A broken source then produces a wrong figure that looks normal.
Questions to settle before you build a dbt metrics layer
Before anything is built, four questions are worth settling. Who is responsible for each metric? Which 10 to 20 metrics come first? Starting with all of them at once takes too long. Which tools need to read the metrics? And how is a change to a calculation checked and approved?
Crystalloids designs, builds and operates enterprise data platforms on Google Cloud. If you want a second opinion on your plans for a dbt semantic layer, get in touch.
Frequently asked questions about the dbt semantic layer
Is the dbt semantic layer open source?
The engine behind the dbt semantic layer is open source. dbt Labs released MetricFlow under the Apache 2.0 licence in October 2025. Connecting dashboards and spreadsheets to your metrics runs through dbt’s paid platform.
Is dbt or Dataform the better fit on BigQuery?
dbt and Dataform both work on BigQuery. Dataform is Google’s own tool. It is built into BigQuery and needs no separate licence, which suits teams that want to stay within Google Cloud. dbt adds the semantic layer and many ready-made extensions.
Does a metric layer make dashboards slower?
A metric layer adds little or no delay by itself. Every figure is still calculated in BigQuery. Whether a dashboard is fast depends mostly on how the tables underneath are set up.
