BigQuery measures GA:统一商业智能指标与知识图谱 | Google Cloud 博客
BigQuery measures GA: Unifying BI metrics and knowledge graphs | Google Cloud Blog
导读
谷歌云在 BigQuery 中正式发布 measures 功能,将其与 BigQuery Graph 结合,让指标定义和图谱关系在同一个模型中统一管理。该功能支持在图表实体上直接定义度量,使 Looker 仪表盘、对话式智能体与数据团队查询基于同一套逻辑,减少人工对账;GA 版本还新增了复合表达式与派生度量、跨事实表查询的 start_node 参数,以及通过 OPTIONS 子句嵌入业务语义元数据,并接入 Knowledge Catalog 供人与 AI 智能体发现和使用。
正在把原文翻译成中文,长文需要一两分钟;先显示原文。
Data Analytics
BigQuery measures is now GA: Unifying metrics and knowledge graphs for AI accuracy
December 2, 2026
Bei Li
Principal Engineer
Deepak Dayama
Group Product Manager
Try Gemini today
The front door to AI in the workplace
To answer a complex business question, an AI agent must understand two things: what happened, and why. The what is a governed metric, like revenue at risk; the why is the network of relationships that produced it. Because metric definitions, a.k.a. measures, traditionally live in the business intelligence (BI) layer while relationships live in knowledge graphs, an AI agent only ever sees half the picture. It guesses the rest, leading to confident but sometimes wrong answers. To help close that gap for the Lakehouse, we introduced measures in BigQuery, which are now generally available. It complements Looker, our governed BI platform, and Knowledge Catalog, the universal layer for context and discovery across your data estate.
Historically, organizations needing both BI and knowledge graphs had to run two siloed technology stacks: one to calculate reliable metrics, the other to map out entity relationships. Bridging them entailed brittle data pipelines and runtime reconciliation by analysts and AI agents, who held the connections in their heads or in sprawling prompts. This patchwork approach wasn't just slow and expensive — it’s where data governance broke down, as every analyst and prompt may define joins and metrics differently.

Figure 1: A unified model for defining BI metrics and knowledge graphs in one place, for powering AI agents, SQL, GQL and dashboards.
To replace manual reconciliation, you need a single model that understands both the structure of your business and the math that measures it. BigQuery measures builds directly on BigQuery Graph to deliver that unified foundation for the Lakehouse. By defining measures directly on the graph entities they describe, your dashboards and AI agents get access to the same metrics and context.
"With BigQuery measures, we can now deliver self-documenting data products. Defining measures natively in BigQuery ensures Looker Dashboards, Conversational Agents and our Data team queries operate on identical logic, guaranteeing metric alignment across leadership and significantly reducing data team maintenance overhead." - Amanda Reelick, Head of Data Enablement, Woolworths NZ
One graph foundation to answer both what and why
Let's walk through an example. Suppose your retail bank's risk analytics team spots a sudden spike in transaction activity in the Prague district. You need to know whether this represents healthy customer growth or concentrated risk exposure. Answering requires two pieces of evidence: how much money actually moved (the what), and which specific accounts it flowed through (the why). At most banks, getting that answer takes two teams, two tools, and two numbers that are rarely reconciled.
With BigQuery, your underlying data is already in place — whether in native tables or in a borderless Lakehouse. With a single schema, you can define a semantic model directly over your existing transaction, account, and district tables — with no data movement and no secondary system:
To determine whether the Prague spike reflects broad growth or concentrated exposure, your team checks whether the transaction volume is spread across many accounts or driven by just a few. Using GRAPH_EXPAND, you flatten the graph and roll up both measures with the AGG() function:
You can ensure accurate reporting by using measures that have been “grain-locked” — where a fixed level of granularity has been assigned to how facts and dimensions are modeled. Because a single account can have thousands of transactions, joining the two tables can duplicate account rows. A standard SQL COUNT(account_id) would overcount those accounts, leaving your risk and finance teams with conflicting numbers. BigQuery measures preserve the native grain of each entity, counting every account only once regardless of how the tables are joined.
The second half of the investigation is about connectivity: Which accounts are driving the Prague activity? You can answer that with a traversal in GQL (the ISO-standard Graph Query Language) over the exact same model:
Neither query requires a separate system, and both evaluate against the same governed definitions.
New features in BigQuery measures
While the preview introduced grain-locked measures tightly integrated with BigQuery Graph, real-world production analytics demand more than basic sums — and enterprise AI agents need programmatic ways to discover and interpret those metrics. The GA of BigQuery measures focuses on two key areas: richer modeling and visualization for complex business logic, and native semantic discovery for the agentic ecosystem.
Richer modeling, querying and data visualization
To enable more expressive and flexible measure definitions, MEASURE() supports both composite expressions and derived measures; this capability is GA. Rather than repeating conditional logic across queries, you can define baseline aggregates once and compose them into higher-order calculations on the same table using AGG(). BigQuery validates these formula dependencies at schema compilation time to catch circular references or invalid aggregations early. Downstream dashboards and AI agents can then query complex ratios and net metrics at any dimensionality with consistent accuracy.
For example, on your Trans node, you can define settled volume alongside total volume, and then derive unsettled volume and unsettled percentage directly from those building blocks:
Query across multiple fact tables
Enterprise data models routinely span multiple business processes. Joining separate fact tables that share a common dimension — such as transactions and credit cards linked to the same bank account — traditionally causes a "chasm trap," where cross-fact multiplication inflates both metrics.
The new start_node argument in GRAPH_EXPAND solves this by isolating each fact table into its own expansion tree. BigQuery evaluates each measure at its native grain before joining the results on the shared entity:
By expanding each fact table from its own root (Trans and Card), each branch maintains its exact grain — even for accounts with transactions but no issued cards.
Built for the agentic era
Attach business meaning to your measures
In a large enterprise schema, it’s nice to be able to attach business meaning to your measures, as multiple metrics often share similar names. In our banking model alone, total_trans_amount, settled_volume, and unsettled_volume could all casually be called "volume" by a business user. That ambiguity can trip up both analysts building reports and AI agents translating natural-language prompts into SQL.
With the GA, you can embed rich semantic metadata directly into each measure definition using the OPTIONS clause, including plain-language description strings, domain synonyms, and custom key-value extensions:
Because this business context lives inside the schema alongside the SQL formula, your semantic definitions travel wherever the metric is queried.
Make measures discoverable to humans and AI agents
BigQuery directly integrates with Knowledge Catalog to create a unified discovery and consumption loop for both people and machines:
- Enterprise-wide context discovery in Knowledge Catalog: BigQuery Graph and measures metadata is automatically ingested and searchable in Knowledge Catalog as a native resource alongside tables, views, and routines. Data stewards, analysts, and AI agents can search across the catalog using business synonyms or descriptions, inspect governance tags, and view the underlying measure’s SQL definitions (such as
SUM(CASE WHEN is_settled = TRUE...)) to verify how each metric is calculated before using it. In Knowledge Catalog, you can also enrich graph metadata with business glossaries and stewardship context, uniting asset discovery, business meaning, and mathematical measures in a single pane so users and agents can work from the same context. - Runtime schema introspection in BigQuery: Calling
BQ.SHOW_GRAPH_EXPAND_SCHEMAreturns an expanded graph's schema as JSON without scanning underlying tables, flagging metrics with"is_measure": truealongside their descriptions and synonyms. Passingflatten_results => FALSEpreserves your entity hierarchy as nestedROW(STRUCT) types, letting agents inspect the relational tree and query paths likeAccount.District.citydirectly.
Connect across your data and AI ecosystem
Finally, BigQuery measures integrates across the Google Cloud data and AI stack so you can author, reuse, and query semantics in the tools you already use:
- Author with AI: Use the graph skills in Data Agent Kit to scaffold, author, and validate BigQuery measure definitions using natural-language prompts in your preferred AI coding environment.
- BigQuery graphs and measures in the borderless Lakehouse: With BigQuery graph and measures, you can define property graph schemas and governed measures directly over your borderless Lakehouse, Google Cloud Storage (GCS) open formats, and open table formats (such as Apache Iceberg via Databricks Unity, Snowflake Horizon, or AWS Glue). This allows AI agents and analytics tools to traverse entity relationships and evaluate governed metrics in place across storage and cross-cloud silos without data duplication or movement.
- Interoperate with Looker: Looker is the enterprise BI semantic layer, where you define governed metrics once, across BigQuery and other datasources, and serve them to dashboards, embedded analytics, and agents. BigQuery Measures executes metrics natively inside BigQuery. If you already model in Looker, keep LookML as your source of truth and use LookML-based derived analytic models to compile Explores, joins, and measures directly into native BigQuery Graph models.
- Query with natural language: Unified graph and measure definitions are supported out-of-the-box in Conversational Analytics, enabling business users and AI agents to ask complex questions against governed metrics in natural language.
Get started with BigQuery measures
The primary advantage of the unified graph based model in the Lakehouse is that you can build from the foundation you already have. If your foundation is a knowledge graph, attach a measure to your most frequent traversal for accurate reporting; if you run a metrics layer you can define it directly on the entity it describes. Whichever side you start from, you are equipping your dashboards to be accurate and for your AI agents to reason about your data more deeply.
To see unified metrics and graph in action, watch the BigQuery measures introduction video, or dive into the BigQuery measures documentation and BigQuery Graph overview. When you are ready to build hands-on, try our step-by-step codelabs for music streaming analytics and marketing funnel attribution.
Posted in
Related articles
[
Data Analytics
Process your PDFs for scalable search and analytics with BigQuery document AI
By Joe Malone • 9-minute read](https://cloud.google.com/blog/products/data-analytics/document-intelligence-in-bigquery-with-parse-chunk-and-search)
[Data Analytics
Turn unstructured data into structured SQL insights with BigQuery AI.AGG (now GA)
By Thomas Anchor • 5-minute read](https://cloud.google.com/blog/products/data-analytics/extract-structured-insights-from-across-entire-tables-of-unstructured-data-with-bigquery-ai)
[Data Analytics
From borderless data to borderless context: context engineering for cross-cloud agents
By Praveen Kumar • 7-minute read](https://cloud.google.com/blog/products/data-analytics/from-borderless-data-to-borderless-context)
[Data Analytics
How Vodafone is using the Data Engineering Agent to improve their data pipelines
By Helena Guerra • 7-minute read](https://cloud.google.com/blog/products/data-analytics/vodafone-cuts-data-pipeline-costs-30-via-data-engineeringagent)
出处
- S 官方Google Cloud Blog · RSS阅读原文 ↗
BigQuery measures GA: Unifying BI metrics and knowledge graphs | Google Cloud Blog
生成时使用了正文节选。