How to perform a dry run of a query so as to get a cost estimate of the query beforehand

0 votes
How to perform a dry run of a query so as to get a cost estimate of the query beforehand? How can I do this using command line?
Nov 21, 2019 in GCP by anonymous
• 19,610 points
4,326 views

1 answer to this question.

0 votes

To perform a dry run:

Enter a query like the following using the --dry_run flag.

bq query \
--use_legacy_sql=false \
--dry_run \
'SELECT
   COUNTRY,
   AIRPORT,
   IATA
 FROM
   `project_id`.dataset.airports
 LIMIT
   1000'

The command produces the following response:

Query successfully validated. Assuming the tables are not modified,
running this query will process 10918 bytes of data.
answered Nov 21, 2019 by Sirajul
• 59,230 points

Related Questions In GCP

0 votes
1 answer

How to get a list of Google Cloud services with their description?

Use just Google's provided API Discovery Service. Here ...READ MORE

answered Nov 4, 2022 in GCP by Tejashwini
• 3,820 points
708 views
0 votes
1 answer
0 votes
2 answers
0 votes
1 answer

Assign access control to a BigQuery Dataset.

You can apply access controls during dataset creation by ...READ MORE

answered Nov 15, 2019 in GCP by Sirajul
• 59,230 points
1,873 views
0 votes
1 answer

Permissions required to update a dataset.

At a minimum, to update dataset properties, ...READ MORE

answered Nov 15, 2019 in GCP by Sirajul
• 59,230 points
1,757 views
0 votes
1 answer

Change default expiration time for a dataset.

You can update a dataset's default table ...READ MORE

answered Nov 15, 2019 in GCP by Sirajul
• 59,230 points
1,747 views
0 votes
1 answer

How to change the storage class of objects within a bucket?

You could do this probably by overwriting the ...READ MORE

answered Oct 25, 2019 in GCP by Sirajul
• 59,230 points
1,947 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP