
Answer-first summary for fast verification
Answer: Use `bq query --dry_run` to determine the number of bytes read by the query. Use this number in the Pricing Calculator.
The correct answer is **B** as this method accurately estimates the yearly BigQuery querying costs by determining the number of bytes read by the query using the `--dry_run` flag with the `bq` command, then applying this figure in the Google Cloud Platform Pricing Calculator. This approach aligns with Google's best practices for pricing queries before execution. - **Option A** is incorrect because `gcloud` is not the appropriate tool for estimating BigQuery query costs. - **Option C** is incorrect for the same reason as Option A; `gcloud` should not be used for this purpose. - **Option D** is incorrect because the `bq estimate` command does not exist, and thus, cannot be used to estimate query costs.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To estimate the annual cost of a BigQuery query scheduled to run nightly, what is the recommended approach?
A
Use gcloud estimate to determine the amount billed for a single query. Multiply this amount by 365.
B
Use bq query --dry_run to determine the number of bytes read by the query. Use this number in the Pricing Calculator.
C
Use gcloud query --dry_run to determine the number of bytes read by the query. Use this number in the Pricing Calculator.
D
Use bq estimate to determine the amount billed for a single query. Multiply this amount by 365.
No comments yet.