Hard1 markMultiple Choice

GCP ACE · Question 38 · Domain 4.4: Managing storage and database solutions

A data analyst is about to run a complex SQL query on a multi-terabyte BigQuery dataset. They are concerned about how much the query will cost and want to estimate the data processed before actually executing it.

Which TWO methods can they use to estimate the cost? (Select TWO)

Answer options:

A.

Use the bq query command with the --dry_run flag.

B.

Look at the query validator in the Cloud Console UI before clicking Run.

C.

Export the table to Cloud Storage and check the file size.

D.

Run the query with a LIMIT 10 clause to test the cost.

E.

Check the Cloud Billing export for the previous day.

How to approach this question

Identify how BigQuery provides cost estimates prior to execution.

Full Answer

BigQuery charges based on the amount of data processed (scanned). You can estimate this cost without running the query by performing a 'dry run'. In the CLI, you use `bq query --dry_run`. In the Cloud Console, the query editor automatically performs a dry run as you type and displays the estimated bytes processed.

Common mistakes

Believing that adding `LIMIT 10` reduces the cost. BigQuery is a columnar database; it scans the entire column regardless of the LIMIT clause.

Practice the full GCP Associate Cloud Engineer Practice Exam 7

50 questions · hints · full answers · grading

More questions from this exam