
Managing data across regions can add friction to analytics workflows for global teams.
To maintain compliance and performance, data is often stored close to where it's generated, like US customer data in us-central1, European logs in europe-west3, and APAC transactions in asia-northeast1.
Analyzing that data together usually meant building and maintaining ETL (Extract, Transform, Load) pipelines just to centralize it. Not only did this add cost and latency, but it also created significant data governance hurdles.
Global Queries in BigQuery change that.
Currently in preview, this feature allows you to query, join, and union datasets across regions using a single SQL query, without building pipelines or moving full datasets.
Reference: https://docs.cloud.google.com/bigquery/docs/global-queries
Why This Matters: The End of “Siloed” Analytics
Previously, if you tried to join a table in the US with one in the EU, BigQuery would throw a “Location mismatch” error.
Global queries solve this by enabling:
- Less reliance on data exports: BigQuery handles cross-region data movement behind the scenes. You can analyze distributed data without maintaining pipelines to centralize it first.
- Better control over data residency: Raw data stays in its original region. Only the required subsets are processed and transferred for the query.
- Faster insights: Run ad-hoc analysis across the globe in seconds instead of waiting for overnight data syncs.
How Global Queries Work
When you run a global query, BigQuery will:
- Select a primary execution region
- Run subqueries in each source region
- Transfer only the required intermediate results
- Combine everything in the primary region and return the final output
This approach avoids full data replication while still enabling cross-region analysis.
SQL Examples: Global Queries in Action
To use this feature, your admin should enable_global_queries_execution and enable_global_queries_data_access in your project settings. Once enabled, the SQL looks just like standard BigQuery SQL.
Joining Across Continents
Imagine you want to calculate the total spend of a US customer based on transaction logs stored in Europe.
SQL
-- Query running in 'us-central1'
SELECT
u.customer_id,
u.name,
SUM(t.amount) as total_eu_spend
FROM
`my-project.us_data.users` AS u
JOIN
`my-project.eu_data.transactions` AS t
ON
u.customer_id = t.user_id
WHERE
u.membership_level = 'Gold'
GROUP BY 1, 2;
Unioning Global Datasets
Need a unified view of all global sales? You can union tables from three different continents.
SQL
-- Unioning data from US, EU, and Tokyo regions
SELECT 'USA' as region, sale_id, amount FROM `my-project.us_sales.orders`
UNION ALL
SELECT 'EU' as region, sale_id, amount FROM `my-project.eu_sales.orders`
UNION ALL
SELECT 'ASIA' as region, sale_id, amount FROM `my-project.tokyo_sales.orders`;
Important Considerations
While global queries are powerful, you should keep a few guardrails in mind.
- Cost: You're charged for the data transferred between regions. Run queries in the region where most of your data lives to keep costs down.
- Latency: Moving data across the Atlantic or Pacific takes time. Global queries will naturally be slower than single-region queries.
- Governance: The feature is disabled by default, which helps prevent unintended data movement across regions.
- Limitations: Some features, including _PARTITIONTIME and materialized views, are not currently supported.
Getting Started with Global Queries
Global queries remove a major barrier to working with distributed datasets, but they still require thoughtful setup.
That includes deciding where queries should run, managing cost exposure, and structuring datasets so queries stay efficient as usage grows. This is where we typically see teams run into issues.
At Calibrate, we help teams design BigQuery environments that balance performance, cost, and governance, including:
- Structuring datasets across regions based on usage patterns
- Reducing unnecessary data movement in cross-region queries
- Building a reporting foundation that stays fast and consistent as data scales
- Connecting BigQuery to dashboards and downstream tools without added complexity
If you're exploring global queries or rethinking your data architecture, it's worth getting the foundation right, from the start.