PDE Maintaining and Automating Data Workloads Practice Question
A data engineer wants to quickly estimate the cost of running a BigQuery query before executing it. Which command-line tool or command should they use?
⚠ Common exam trap
PDE often tests the distinction between flags that change execution behavior (--use_cache=false) and flags that only estimate without executing (--dry_run), so candidates who don't know the dry-run semantics pick a plausible-sounding but wrong flag.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
bq query --dry_run
The bq query --dry_run flag validates a query and returns the amount of data it would process without actually executing it, which is the standard way to estimate BigQuery on-demand query cost. Since BigQuery on-demand pricing is based on bytes scanned (currently $6.25 per TiB), the dry-run's reported bytes give a direct cost estimate. It also validates syntax and permissions without incurring charges.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
gcloud logging read
Why it's wrong here
This reads Cloud Logging entries, which contain historical audit and job logs, not a forward-looking cost estimate for a query. It is tempting because BigQuery job metadata appears in logs, but the correct tool is bq query --dry_run, which returns bytes processed before execution.
- ✗
bq query --use_cache=false
Why it's wrong here
Disabling the cache forces the query to run and be billed, so it cannot estimate cost beforehand. It is tempting because cache settings affect bytes billed, but the requirement is a dry run: bq query --dry_run validates and reports bytes processed without executing anything.
- ✗
gcloud bigtable queries run
Why it's wrong here
Bigtable is a NoSQL wide-column store, so this command queries Bigtable tables and cannot estimate BigQuery query costs. It is tempting because gcloud offers BigQuery tooling, but the correct approach is the bq command with --dry_run, which returns bytes processed without executing the query.
- ✓
bq query --dry_run
Why this is correct
The bq query --dry_run flag validates the query and returns the bytes it would process without executing it or incurring charges. Multiplying those bytes by the on-demand rate gives a cost estimate before running the job.
Go deeper
Related to this question
About these practice questions
One of 747 original PDE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Google Cloud exam blueprint
This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.