
Answer-first summary for fast verification
Answer: Using the command line, apply the `--dry_run` option in BigQuery to find out the number of bytes read, then utilize the price calculator to estimate the cost.
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.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
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?
A
Using the command line, apply the --dry_run option in BigQuery to find out the number of bytes read, then utilize the price calculator to estimate the cost.
B
Using the command line, apply the --dry_run option in BigQuery to find out the number of bytes returned, then utilize the price calculator to estimate the cost.
C
Using the command line, apply the --dry_run option in BigQuery to find out the time taken, then utilize the price calculator to estimate the cost.
D
Using the command line, apply the --dry_run option in BigQuery to determine the total amount of table data in bytes, assuming a full scan, then utilize the price calculator to estimate the cost.