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
• 8,200 points
67 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
• 46,080 points

Related Questions In GCP

0 votes
1 answer

How to export a custom image to the cloud storage?

The preferred way to export an image ...READ MORE

answered Oct 18, 2019 in GCP by Sirajul
• 46,080 points
116 views
0 votes
1 answer

How do I create a BigQuery Dataset using the console?

To create a dataset: Open the BigQuery web ...READ MORE

answered Nov 15, 2019 in GCP by anonymous
• 46,080 points
38 views
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
• 46,080 points
48 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
• 46,080 points
53 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
• 46,080 points
46 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 24, 2019 in GCP by Sirajul
• 46,080 points
35 views
0 votes
1 answer