BigQuery Implementation Mistakes: Fix Missing Data, Cost Surprises and Unreliable Reports
BigQuery can run a query successfully while the report is wrong. A missing Google Analytics 4 (GA4) export day looks like a traffic decline. A dashboard repeatedly scans raw events nobody needed. An application programming interface (API) connector supplies aggregated sessions, but the team treats them as event-level history. A useful implementation makes those differences visible before someone changes a budget based on them.
On this page
Which output and operating contract should you define first?
Start with a business question that needs warehouse data: paid acquisition by customer cohort, trial activation by source or revenue after refunds. Then specify the source, reporting grain, identity rules, timezone, freshness requirement and owner.
Record three separate Google Cloud concepts: where data lives, which project runs and pays for jobs, and which identity performs the work. A user may read a dataset in one project while creating the query job in another. Troubleshooting only the storage project can miss the activity causing the bill.
For every production output, define what should happen when inputs are missing. A revenue chart should show that a billing source is late. Replacing unknown values with zero can make a broken pipeline look like a business crisis.
Our marketing data warehouse guide explains the modeling decisions. The checks below focus on the BigQuery setup mistakes that can invalidate that design. Our warehouse and customer-data implementation service scopes a repair around accepted reporting evidence, rather than the first query that runs.
Implementation triage. The symptom selects the first evidence to inspect; it does not establish the cause by itself.
| Symptom | First evidence | Stop the misleading result |
|---|---|---|
| A sudden revenue or traffic drop | Expected export dates, source volume and billing state | Mark missing coverage before changing budgets |
| History disappears | Actual table expiration and sandbox status | Preserve remaining data and identify the retention boundary |
| The bill grows with dashboard refreshes | Jobs by project, identity and repeated query | Inspect scan volume and the reporting grain |
| A cross-source join fails | Exact dataset and execution locations | Check placement before rewriting business logic |
Check source coverage before treating a warehouse result as a business change. A restored pipeline does not recreate missing history; compare performance and cost only after the reporting population and definitions are trustworthy.
Read diagram as text
- Define the output grain and data job and billing responsibilities to Exact locations and production identity access are correct?.
- Exact locations and production identity access are correct? to Repair access or plan the location migration with dependencies: No.
- Repair access or plan the location migration with dependencies to Define the output grain and data job and billing responsibilities.
- Exact locations and production identity access are correct? to Inventory actual dates streams grain and accepted coverage: Yes.
- Inventory actual dates streams grain and accepted coverage to The required source population is available and complete?.
- The required source population is available and complete? to Restore the pipeline and preserve any unrecoverable history gap: No.
- The required source population is available and complete? to Measure the bounded reporting model and recurring workload: Yes.
- Measure the bounded reporting model and recurring workload to Correctness late updates execution controls and recovery pass?.
- Correctness late updates execution controls and recovery pass? to Repair the failed model or operating control and retest: No.
- Repair the failed model or operating control and retest to Measure the bounded reporting model and recurring workload.
- Correctness late updates execution controls and recovery pass? to Hand over verified output cost baseline and recovery ownership: Yes
Why can a linked GA4 property still have missing export days?
A successful link does not establish complete date coverage. A property can be linked while required daily tables are missing. Check which property, streams and export modes are enabled, then inventory the actual date coverage. Use the first complete observed export date in your reporting contract. Do not promise pre-link raw event history merely because the property has existed for years.
For standard properties, persistent excess over one million daily events can pause batch export; significant excess can pause it immediately. Missed days are not reprocessed. Export filters reduce volume but change reporting scope. Document the selected population in the report itself. GA4 export limits
Streaming is a different tradeoff. Google's export overview describes no streaming volume limit, but calls the service best effort and warns about gaps and incomplete traffic-source information. Streaming is not a guaranteed substitute for a complete daily export.
Inspect date coverage before writing a complicated reconciliation query. This original Structured Query Language (SQL) metadata query lists whether each expected daily table exists for a fixed week:
WITH expected AS (
SELECT export_date
FROM UNNEST(GENERATE_DATE_ARRAY(
DATE '2026-10-06', DATE '2026-10-12'
)) AS export_date
), daily_tables AS (
SELECT
SAFE.PARSE_DATE('%Y%m%d', SUBSTR(table_name, 8)) AS export_date,
table_name
FROM `your-project.analytics_123456789.INFORMATION_SCHEMA.TABLES`
WHERE REGEXP_CONTAINS(table_name, r'^events_[0-9]{8}$')
AND table_type = 'BASE TABLE'
)
SELECT
e.export_date,
d.table_name,
d.table_name IS NOT NULL AS daily_table_exists
FROM expected AS e
LEFT JOIN daily_tables AS d USING (export_date)
ORDER BY e.export_date;Replace the project, property dataset and dates. Run the job in the dataset's location with appropriate metadata access. Check both queries against a controlled dataset with known coverage before using the results to change reporting. Google's TABLES reference documents the metadata fields.
The exact name filter excludes intraday tables, backups and similarly named views. Table existence is only the first check. An empty or partial daily table still requires row counts, event coverage and freshness checks. A missing table is unknown data, not evidence of zero events.
Keep a coverage record with four states: absent, present but provisional, accepted for reporting, and known incomplete. Store the reason and the last successful validation. Use that record to control downstream refreshes and annotate reports.
How do billing and sandbox limits create permanent gaps?
Billing failures can interrupt exports, while sandbox retention can remove the history you expected to keep. Assign an owner to the Cloud billing account and its payment status. A warehouse engineer may see successful SQL while an export has stopped for a billing reason. Google documents that invalid-payment interruptions leave export gaps it cannot re-export.
Recover the pipeline first, then record the historical gap honestly. Check whether another authorized source retained the business facts you need, such as paid orders in the billing system. Restoring an order total does not reconstruct all missing browser events or attribution details. Keep substitute data and its provenance distinguishable.
The BigQuery sandbox has a lifetime storage allowance of 10 GiB that deletion does not replenish, one TiB of monthly query processing and automatic sixty-day expiration for tables, views and partitions. Streaming, data manipulation language (DML) statements and Data Transfer Service are unavailable there. These constraints differ from a billing-enabled project that happens to remain within eligible free usage.
Before relying on the export, check billing status and actual expiration settings. After an upgrade, verify existing tables and defaults rather than assuming that history is now retained indefinitely. Retention needs a business decision: acquisition analysis, annual cohorts and short-lived debugging datasets may require different periods.
Add alerts for missing expected dates and unexplained volume changes. Checking the payment method only after a monthly report fails is too late to protect history.
Why do dashboard queries keep scanning too much data?
Dashboards can repeatedly scan event-level history when they only need a small daily summary. Start a cost investigation with job evidence. Identify the job project, identity, schedule and recurring query pattern. A dashboard with multiple tiles and frequent refreshes can perform far more work than its user count suggests.
This original diagnostic groups recent completed query jobs by submitting identity and reservation. It excludes parent script totals so child-query usage is not counted twice:
SELECT
user_email,
reservation_id,
COUNT(*) AS query_jobs,
COUNTIF(total_bytes_billed IS NULL) AS jobs_with_unknown_bytes,
SUM(total_bytes_billed) / POW(1024, 4) AS known_billed_tib,
SUM(total_slot_ms) / 3600000.0 AS consumed_slot_hours
FROM `your-project.region-us.INFORMATION_SCHEMA.JOBS_BY_PROJECT`
WHERE creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
AND job_type = 'QUERY'
AND state = 'DONE'
AND (statement_type IS NULL OR statement_type != 'SCRIPT')
GROUP BY user_email, reservation_id
ORDER BY known_billed_tib DESC;Use the job project and correct region qualifier; the execution location must match. Access to project-wide job metadata requires the relevant permissions. Google's JOBS reference explains the fields and the absent byte values for queries over tables with row-level access policies.
This is a workload diagnostic, not an invoice. Null bytes remain unknown, and consumed slot-hours do not equal purchased reservation capacity. Do not multiply every row by one on-demand rate: capacity-based usage and some operations have different billing rules. The creation-time window also differs from a billing-period reconciliation.
Trace the largest recurring groups to their purpose, then design a reporting model at the grain the dashboard actually needs. A daily campaign summary can serve many ordinary charts; event-level investigation can retain a separate path to raw data.
Include the cost of creating and refreshing the summary. Hypothetical scan workload, GiB per day. Forty dashboard queries run each day; no dollar saving or billing mode is assumed.
| Work | Direct raw queries: GiB/day | Summary model: GiB/day | Assumption |
|---|---|---|---|
| Dashboard queries | 1,000 | 10 | 40 × 25 GiB versus 40 × 0.25 GiB |
| Daily summary build | 0 | 100 | One refresh, including its source scan |
| Total | 1,000 | 110 | 89% less scanned data in this example |
Measure actual billed bytes and scheduled workload before claiming a saving in your account. A scan reduction is not automatically an equal reduction in a capacity-based invoice.
The cheaper model still has to preserve the answer. Check dimensions, late updates, unknown attribution and refund handling. A summary that drops inconvenient records can appear fast and inexpensive because it no longer answers the original question.
How can dataset location break an otherwise valid query?
Dataset and job locations must match the actual sources and joins. Choose the location with required sources, organization policies and downstream jobs in view. A GA4 export in US and a CRM dataset in us-central1 are not automatically colocated simply because both are in the United States.
Google's dataset documentation says the location is set at creation and cannot be edited afterward. Ordinary queries referencing multiple datasets require compatible placement in the same location. Record exact location identifiers in the implementation inventory, not broad labels such as “America” or “Europe.”
If the location is wrong, plan a migration. Preserve the existing data, inspect dependent views and connections, reconcile the new copy and verify new writes before cutover. A successful historical copy does not prove tomorrow's export reaches the intended destination.
The current GA4 setup guide describes replication as an alternative to deleting the export link. Evaluate its prerequisites for the actual dataset.
The replication documentation describes asynchronous secondary replicas, separate storage and transfer costs, and promotion requirements. Scheduled queries do not automatically move to a new primary location. Recreate or reconfigure those dependencies as required and test them. Do not promise a migration with no interruption solely because replication exists.
Why does an API report differ from raw event export?
An API report and raw export can represent different grains, calculations and processing states. Ask the connector what it actually retrieves. Does it call the GA4 Data API for a report with selected dimensions and metrics, or load the native event export? Both can produce tables in BigQuery. They are different data products.
The Data API runReport method returns a report specified by dimensions, metrics, dates and filters. Loading that result into a warehouse does not turn it into individual events. A table of sessions by source cannot recreate the exact sequence of pages and product actions for each visitor.
Google's UI versus export explanation describes differences caused by reporting calculations, modeling, cardinality handling and metric scope. Use that distinction when investigating discrepancies, while checking the current export schema for fields added since older examples were written.
Write a comparison contract before calling a difference a bug:
- Same property and selected data streams.
- Same date boundaries and property timezone.
- Same event or business metric definition.
- Same filters, currency treatment and inclusion of refunds where relevant.
- Explicit choice of user, session, event or item scope.
- A known treatment of provisional data and unavailable modeled components.
For example, compare purchase-event counts before comparing an attributed revenue report. If raw purchase counts reconcile but channel totals differ, investigate attribution and scope. Rewriting the ingestion process would target the wrong layer.
Our GA4 purchase mismatch guide provides a more specific transaction investigation. Preserve unresolved differences as named reconciliation items instead of applying an unexplained adjustment factor.
When should recent daily data be rebuilt?
Rebuild recent dates because daily and intraday tables can change after their first appearance. The GA4 export schema describes their naming and the regular late-arrival update window. Google documents ordinary late-arrival updates for up to three days after the event date. This source window is separate from your own controlled business-correction process.
Design a recent-date rebuild window and a separate controlled backfill process. The guide to late-arriving GA4 events and restatements separates source acceptance windows from report-closing policy. For a daily reporting model, reprocessing the recent exported dates can capture ordinary updates. Detect older changes or business corrections and rebuild the affected range deliberately. A scheduled job that always reads only yesterday can miss changes to earlier dates.
Make replacement idempotent: rerunning the same accepted input should produce the same business result. Append-only aggregation can count updated source rows twice. Reconcile counts and key financial totals after replacing a date partition.
Use completed daily tables for stable historical reporting and define a separate current-day view if the business needs it. Do not union overlapping daily and intraday data and sum both. Also avoid claiming that an intraday table's presence proves complete current-day collection.
Timezone belongs in the model contract. Calendar dates in the property timezone and UTC timestamp boundaries can assign near-midnight activity differently. Test an event near midnight in the actual property timezone rather than assuming the warehouse job's default date is the right reporting date.
Which controls can stop a costly query before it runs?
Use limits on the jobs that actually execute, alongside partition design and billing visibility. Google's cost-control guidance supports dry-run estimates and maximum bytes billed for on-demand queries. Set controls in the clients and job configurations that actually submit work. A limit used in one analyst's console does not automatically constrain a business intelligence (BI) connector or generated SQL from another tool.
Avoid relying on LIMIT 100 to reduce scans of an unclustered table. Select the required columns and constrain the source dates. For date-partitioned reporting tables, a required partition filter can reject queries without the necessary partition predicate. Verify that the dashboard's filters reach the SQL in a form that actually prunes data.
Required filtering is not a maximum date range: a query can still ask for a very broad period. Pair model design with sensible execution limits and monitor recurring workloads.
For on-demand workloads, custom query quotas provide project and per-user safeguards. They are approximate, not exact dollar caps. The per-user setting applies separately to all users and service accounts, not as a unique custom quota for one named analyst.
Cloud Billing's current spend-cap budget documentation covers selected services and does not list BigQuery. Do not assume a budget feature for another Cloud product stops warehouse usage. Combine the appropriate query or reservation controls with billing visibility and a named response owner. Our BigQuery pricing guide explains the different billing units.
What must the next owner be able to operate?
The next owner must be able to trace a report to its inputs, run identity, cost and recovery path. Document the source link, export identity, job identities, billing project, locations, models, schedules and consumers. Avoid an undocumented chain of resources owned by the person who happened to set them up.
Check the identity shown on the GA4 link itself. New links use a built-in resource identity; older links may still use the legacy service account. Inspect the actual link before removing an unfamiliar identity or copying old Identity and Access Management (IAM) instructions.
Test a scheduled run under its real service identity, including reading source data, creating or replacing the intended output and serving the BI consumer. Do not accept a developer's broader permissions as proof that production works.
Use a handover exercise that another team member can perform: identify a missing date, locate the relevant failed job, repair a nonproduction test input and rerun the affected model without duplication. Record how to pause a bad downstream refresh and how to restore the last accepted result.
An implementation estimate should reserve time for these checks. A data ownership and approval map helps distinguish who can change a source from who can approve a reporting definition. A first-source proof of concept and a production marketing warehouse are different scopes. Estimate the work from source access, model complexity, historical repair and validation requirements, then specify the acceptance evidence for each milestone. A fixed launch date cannot make unavailable raw history recoverable.
What should pass before you accept the implementation?
Accept a reporting output only when its coverage, correctness, operating limits and recovery procedure have evidence. If the repair reveals a platform mismatch, compare when moving off BigQuery is the better fix before adding another workaround.
Checklist
- The output has an agreed grain, timezone, identity model and business owner.
- Dataset locations and job execution locations are explicitly recorded.
- The job project and billing owner are known for each recurring workload.
- GA4 property, streams, export modes and first complete date are verified.
- Missing and incomplete export dates are visible to report consumers.
- Event-volume limits, billing status and retention settings are monitored.
- API-report data is distinguished from raw event exports.
- Recent-date updates and controlled historical rebuilds are handled without duplication.
- Dashboard models preserve agreed totals while avoiding unnecessary raw scans.
- Query controls apply in actual production submission paths.
- Another owner can diagnose and recover a failed reporting cycle.
Start with one consequential report and trace its dependencies end to end. Get the $99 martech audit to identify the broken boundary, or request a detailed BigQuery implementation scope with the missing periods, source inventory and acceptance criteria.
Keep reading
Browse all Data Warehouse guides
Martech AIBigQuery AI: Gemini, Data Agents and AI Functions for Marketing Data
Choose BigQuery AI tools for marketing data. Understand Gemini costs, data-agent setup, AI functions, permissions and how to verify useful outputs.
Jafrin Akter AloLast updated 14 min read
Data WarehouseGA4 BigQuery Sessionization: Build and Validate Session Counts
Build GA4 session counts in BigQuery with correct composite IDs, timezone boundaries, missing-data coverage and SQL validation fixtures.
Jafrin Akter AloLast updated 9 min read
Martech AIBigQuery MCP server: Google's remote service, MCP Toolbox and the controls you need
Give an AI assistant controlled BigQuery access. Compare connection routes, define trusted datasets and test query correctness, permissions and costs.
Jafrin Akter AloLast updated 11 min read
BigQuery implementation
See the setup scope, acceptance checks and handover.
Questions people ask
How should you test a warehouse repair without copying sensitive production records?
Use a small approved fixture that preserves the structures and edge cases needed for the test while removing unnecessary personal data. Keep access limited and set an expiry for the fixture. Reproduce duplicates, late records and missing values deliberately. Then validate the authorized production result separately; a synthetic test proves the logic it exercises, not the completeness of real inputs.
When should two teams use separate query-job projects?
Separate job projects can make spending responsibility and operating permissions easier to assign when teams have different owners or workloads. Keep the shared dataset access and location requirements explicit. First decide who pays, who can submit jobs and who responds to runaway usage. Creating more projects without that responsibility map adds administration while leaving the original ownership problem unresolved.
What should finance receive after a BigQuery reporting incident?
Provide the affected period, which published measures were unreliable, the accepted replacement or coverage gap, and any resulting cost correction. Separate missing source data from an incorrect model and from a delayed dashboard refresh. Include the owner and evidence for closure. Finance should not have to infer whether a restored chart means the historical business totals were also repaired.
How should a connector upgrade be accepted?
Treat the upgrade as a change to a data contract. Compare a fixed period before and after, including field types, identifiers, nulls and record counts. Exercise deleted records and corrections if the connector supports them. Keep the previous configuration and a recovery plan, and confirm the next scheduled run before accepting the version for routine reporting.
What should happen after someone discovers an unexpectedly broad data grant?
Have the responsible owner assess and restrict the grant through the organization's incident process, preserving evidence of the configuration and relevant activity. Identify dependent jobs before removing access blindly, then test the intended identities with narrower permissions. Review how the grant was created and prevent the same path from recurring. A successful query does not establish that its access was appropriate.
Sources
- BigQuery: Create datasets and location limitations.
- Google Analytics: Set up BigQuery Export.
- BigQuery: Cross-region dataset replication.
- Google Analytics: Export modes and processing.
- BigQuery: TABLES metadata reference.
- BigQuery: Sandbox limitations.
- Google Analytics Data API: runReport.
- Google Analytics: Reporting UI and BigQuery differences.
- Google Analytics: BigQuery Export schema.
- BigQuery: JOBS metadata reference.
- BigQuery: Estimate and control costs.
- BigQuery: Partition filter requirements.
- BigQuery: Custom query quotas.
- Google Cloud Billing: Spend-cap budgets.

Written by
Jafrin Akter AloData Engineer and Co-founder at Martechdevs and Growth and Analytics Partners
Jafrin writes practical guides to marketing technology, customer data, analytics and AI workflows. Martechdevs is a Growth and Analytics Partners company.