Ultimate access to all questions.
When you need to run a query on a large dataset stored in BigQuery and anticipate a substantial amount of data to be returned, what is the best method to estimate the cost of the query?
Explanation:
The correct answer is A because the --dry_run
option allows you to estimate the cost of your queries before executing them. It returns the number of bytes read, which can then be used with the Pricing Calculator to estimate the query cost. This method is recommended in the GCP documentation under BigQuery Best Practices. Options B and C are incorrect because the estimation should be based on the bytes read by the query, not the bytes returned or the time taken. Option D is incorrect because the bytes read depend on the query and do not always result in a full table scan.