BigQuery Measures Reaches General Availability, Unifying BI Metrics and Knowledge Graphs
Google Cloud have confirmed that BigQuery measures, previously in preview, has reached general availability. It lets a business define governed BI metrics on the same model as its knowledge graph relationships, directly inside BigQuery, rather than maintaining the two separately.
How does this help?
Google frames this around AI agents specifically. To answer a business question properly, an agent needs two things: what happened, a governed metric such as revenue at risk, and why it happened, the network of relationships that produced it. Metric definitions traditionally live in BI platforms. Relationships live in knowledge graphs. An agent working from only one of those sees half the picture and guesses the rest, which is where confident but wrong answers come from.
Most organisations running both have ended up with two separate stacks: one calculating metrics, another mapping relationships, bridged by pipelines and by analysts reconciling the two by hand. Google’s own framing is blunt about where that breaks down: every analyst, and every prompt an AI agent is given, can end up defining joins and metrics slightly differently, which is exactly the kind of governance gap that undermines trust in the output.
BigQuery measures builds on BigQuery Graph to put both in one place: measures are defined directly on the graph entities they describe, so a query or an AI agent gets the number and the relational context behind it from a single governed model.
What does this look like?
Google’s own example is a retail bank spotting a spike in transaction activity in one district. Answering whether that is healthy growth or concentrated risk needs two things: how much money moved, and which specific accounts it moved through.
With BigQuery measures, both questions run against the same schema. A property graph defines the entities (transactions, accounts, districts), their relationships, and a measure on each node, such as a grain-locked SUM(amount) on transactions. From there, GRAPH_EXPAND rolls the measures up by district using the AGG() function, while a GQL traversal over the same graph (MATCH across the POSTED_TO and LOCATED_IN edges) answers which specific accounts were involved. Neither query needs a separate system, and both read from the same governed definitions.
Google’s own example, reproduced here from its blog post, declares the graph once, with each measure defined directly inside its table’s PROPERTIES:
-- Entities, relationships, and measures, declared in one model
CREATE OR REPLACE PROPERTY GRAPH retail_banking.BankingGraph
NODE TABLES (
retail_banking.trans AS Trans
KEY (trans_id)
PROPERTIES (
trans_id, account_id, amount,
MEASURE(SUM(amount)) AS total_trans_amount
),
retail_banking.account AS Account
KEY (account_id)
PROPERTIES (
account_id, district_id, stmt_frq,
MEASURE(COUNT(account_id)) AS account_count
),
retail_banking.district AS District
KEY (district_id)
PROPERTIES (district_id, city, state)
)
EDGE TABLES (
retail_banking.trans AS POSTED_TO
KEY (trans_id)
SOURCE KEY (trans_id) REFERENCES Trans (trans_id)
DESTINATION KEY (account_id) REFERENCES Account (account_id)
NO PROPERTIES,
retail_banking.account AS LOCATED_IN
KEY (account_id)
SOURCE KEY (account_id) REFERENCES Account (account_id)
DESTINATION KEY (district_id) REFERENCES District (district_id)
NO PROPERTIES
);
The BI-style question, total volume and account count by district, reads both measures at once through GRAPH_EXPAND, each rolled up with AGG():
-- Volume by city, and the accounts behind it, each counted once
SELECT
District_city,
AGG(Trans_total_trans_amount) AS total_volume,
AGG(Account_account_count) AS accounts_involved
FROM GRAPH_EXPAND("retail_banking.BankingGraph")
GROUP BY District_city;
The relationship-style question, which specific accounts were involved, runs as a GQL traversal over the same graph, no separate system needed:
-- Which accounts moved money in a given city
GRAPH retail_banking.BankingGraph
MATCH (:Trans)-[:POSTED_TO]->(a:Account)-[:LOCATED_IN]->(d:District)
WHERE d.city = 'Prague'
RETURN DISTINCT a.account_id
The grain-locking matters for anyone who has hit this problem before: joining a transactions table to an accounts table can multiply account rows, since one account can have thousands of transactions. A plain COUNT(account_id) after that join overcounts. BigQuery measures preserve each entity’s native grain regardless of how the tables get joined, so the account count stays correct next to the transaction total.
What is new in the general availability release
Three areas of the feature moved from preview to GA alongside the core grain-locked measures: richer modelling, multi-fact-table support, and discovery for AI agents.
Composite expressions and derived measures let you define a baseline aggregate once, such as settled transaction volume, and then build higher-order calculations on top of it with AGG(), such as an unsettled percentage. BigQuery validates these dependencies at schema compilation time, catching circular references before a query runs rather than at query time. Google’s example extends the Trans table’s properties with exactly this pattern:
-- Compose custom calculations, conditional expressions, and derived ratios
PROPERTIES (
trans_id, account_id, amount, fee, is_settled,
MEASURE(SUM(amount)) AS total_trans_amount,
MEASURE(SUM(CASE WHEN is_settled = TRUE THEN amount ELSE 0.0 END))
AS settled_volume,
-- Derived: written in terms of the measures above, not the raw columns
MEASURE(AGG(total_trans_amount) - AGG(settled_volume)) AS unsettled_volume,
MEASURE(
SAFE_DIVIDE(AGG(total_trans_amount) - AGG(settled_volume),
NULLIF(AGG(total_trans_amount), 0)) * 100.0
) AS unsettled_pct
)
Querying across multiple fact tables is handled through a new start_node argument on GRAPH_EXPAND. Joining two fact tables that share a dimension, transactions and credit cards both linked to the same account, has traditionally caused a “chasm trap” where the join inflates both metrics. The new argument expands each fact table from its own root before joining on the shared entity, so each measure keeps its correct grain even when one side of the join (an account with no cards issued, for example) has no matching rows:
-- Transactions and cards per account, each evaluated at its own root grain
SELECT
ET.Account_account_id,
AGG(ET.Trans_settled_volume) AS settled_volume,
AGG(EC.Card_card_count) AS total_cards_issued
FROM
GRAPH_EXPAND("retail_banking.BankingGraph", start_node => "Trans") AS ET
LEFT JOIN
GRAPH_EXPAND("retail_banking.BankingGraph", start_node => "Card") AS EC
ON ET.Account_account_id = EC.Account_account_id
GROUP BY ET.Account_account_id;
Native visualisation is handled through an updated BigQuery connector in Google’s Data Studio, which Google says connects directly to BigQuery graphs and honours the aggregation logic defined in the model, rather than letting a dashboard tool re-aggregate the numbers itself on the client side.
Business meaning can now be attached directly to a measure through an OPTIONS clause: a plain-language description, a list of synonyms, and custom key-value extensions such as an owning team or a reporting tier. Because that context lives in the schema next to the SQL, it travels with the metric wherever it is queried, including by an AI agent trying to work out whether “volume” means total volume or settled volume:
-- Business meaning and governance metadata travel with the metric itself
MEASURE(SUM(CASE WHEN is_settled = TRUE THEN amount ELSE 0.0 END))
AS settled_volume
OPTIONS (
description = 'Transaction value that settled. Excludes fees.',
synonyms = ['settled amount', 'cleared volume'],
extensions = [('unit', 'USD'),
('owner', 'finance-analytics'),
('reporting_tier', 'executive')]
)
That discoverability is also where Knowledge Catalog comes in. BigQuery Graph and measures metadata is automatically indexed there alongside tables, views and routines, searchable by business synonym or description, with the underlying SQL definition of a measure visible before anyone, human or agent, relies on it. A separate function, BQ.SHOW_GRAPH_EXPAND_SCHEMA, returns a graph’s expanded schema as JSON without scanning the underlying tables, flagging which fields are measures and letting an agent inspect the entity hierarchy directly.
Where it fits with the rest of the stack
Google is positioning this as something you build onto an existing foundation rather than a new system to adopt from scratch. If a business already models metrics in Looker, LookML-based derived analytic models can compile existing Explores, joins and measures directly into a native BigQuery Graph model. Conversational Analytics supports the unified graph and measure definitions out of the box, so a business user or an agent can ask a question in plain language against the governed model rather than the AI having to reconstruct the metric logic itself. On the authoring side, Data Agent Kit’s graph skills can scaffold and validate measure definitions from natural-language prompts in an IDE.
Why this matters beyond BigQuery specifically
This is the same argument we make about AI-ready data generally, just arriving from the warehouse vendor’s own product roadmap rather than from a tagging or tracking angle. An AI agent, or a dashboard, is only as reliable as the model underneath it, and a model split across two disconnected systems is exactly where that reliability tends to break. Governed metrics and relationship context living in one place, with the same definitions reachable by SQL, GQL, a BI tool and a conversational agent, is a direct answer to one of the more common reasons brands end up not trusting what their own AI tools tell them.
Newsletter
Occasional notes on data, tracking & AI-readiness
No spam, no growth-hacking. Just an email when there's something worth reading.