Under BigQuery on-demand pricing, cost is based on the number of bytes processed (scanned) by the query, not the number of bytes or rows returned in the result set. Performing a dry run (for example, using the bq query --dry_run command-line flag, or letting the console's query validator run) does not execute the query or incur any charge, but it returns an estimate of the total bytes that would be processed. That bytes-processed estimate can then be entered into the Google Cloud Pricing Calculator under the BigQuery on-demand service to calculate the expected dollar cost before actually running the query.
Community Discussion