GCP Associate Cloud Engineer Practice Question 86: BigQuery Dry Run Cost Estimate
Google Cloud Associate Cloud Engineer · Test 9 · question 6 of 10
An analyst is about to run a query against a multi-terabyte BigQuery table and wants to know how many bytes the query will process, and therefore roughly what it will cost, before actually running it and incurring any charges. What should they do?
Show answer and explanation
Answer:
A dry run (the --dry_run flag in bq query, or the equivalent API/console option) validates the query and returns the number of bytes it would process, which BigQuery's on-demand pricing bills for, all without actually running the query or charging for it. This is the standard way to estimate cost before committing to a query.
Option A is a common misconception: LIMIT reduces the rows returned but BigQuery still scans the full columns referenced by the query, so it does not reduce bytes processed or cost. Option B does give an accurate bytes-billed figure, but only after the query has already run and been charged for, which defeats the goal of estimating cost beforehand. Option D is impractical and unreliable; BigQuery already computes this precisely via dry run, so manually estimating from a schema adds effort and risks being wrong.
Reference: Estimate storage and query costs