
Answer-first summary for fast verification
Answer: Construct the query and utilize the --dry_run flag to ascertain the data volume read, then apply the pricing calculator for cost estimation.
The correct answer is **C** because the `--dry_run` option allows for the estimation of query costs by returning the amount of data read without executing the query. This data can then be used with the Google Cloud Platform Pricing Calculator to estimate the cost. This approach is recommended in Google Cloud's best practices for BigQuery to preview and estimate costs before actual execution. Options A, B, and D are incorrect as they do not provide valid methods for estimating query costs before execution.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Your security team has requested you to provide some analytics based on logs exported to BigQuery. Given the team's structure, your manager has tasked you with estimating the query's cost beforehand. What is the most effective method to estimate this cost?
A
Use the BigQuery index viewer to estimate the number of records that will be read.
B
It's impossible to estimate the cost of a query before execution.
C
Construct the query and utilize the --dry_run flag to ascertain the data volume read, then apply the pricing calculator for cost estimation.
D
Execute the query in a cost estimation mode to directly get the cost.