Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

BigQuery Dry Run

In my organization we'll be accessing BQ through a third party tool like Tableau over JDBC/ODBC connection , One of the key optimization lever for BQ is to run the query in Dry run mode but that's only doable through console , Is it feasible to run BQ in Dry run from 3rd party tools like tableau?

Solved Solved
0 2 2,646
1 ACCEPTED SOLUTION

At the highest level, my belief is that the answer to your question is "no".  Here is my thinking.  BigQuery allows you to execute SQL queries against it.  BigQuery provides an API that you can use to submit those queries.  One of the parameters of those queries is "dryRun" which can be true/false.  (see here).  What this much tells me is that if you are making your own API calls to BigQuery using the Google BigQuery API then you have full control over specifying dry run.  However, your question was about 3rd party products such as Tableau.  Now things get more subtle ... for a 3rd party product, it will still have to make a query call to BigQuery and exactly how the product makes the BigQuery call will give us an indication on the overall answer.

I see two possibilities:

1. The 3rd party application makes BigQuery API calls directly.  In this case, it would be up to the 3rd party product whether or not it exposes a mechanism to enable "dry run".  Technically, it could ... but it would be up to that product to determine how flag would be switched on.

2. The 3rd party application makes BigQuery API calls indirectly through JDBC/ODBC.  In this case, you are likely using the Magnitude Simba drivers described here.  I looked at both JDBC and ODBC and searched for "dry run" in their detailed specs and found nothing.  That seems to tell me that they have no "special" switches to enable dry run execution.

Putting all this together, I'm going to guess that you can't make a dry run call from a 3rd party app unless that app explicitly makes BigQuery API calls itself and provides explicit enablement for making dry-run requests.

View solution in original post

2 REPLIES 2

Hi @Raahulvarma99 

Once you connected third party tool to BigQuery and provided dataset , it will execute query and fetch data. Before connecting you can see query in cloud console if possible else we have another option to check query job usage , this is not actual dry run but you can analyse data fetched by your Tableau or BI Dashboard. In below query result check out for label_value column.

SELECT
*
FROM
`region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT

At the highest level, my belief is that the answer to your question is "no".  Here is my thinking.  BigQuery allows you to execute SQL queries against it.  BigQuery provides an API that you can use to submit those queries.  One of the parameters of those queries is "dryRun" which can be true/false.  (see here).  What this much tells me is that if you are making your own API calls to BigQuery using the Google BigQuery API then you have full control over specifying dry run.  However, your question was about 3rd party products such as Tableau.  Now things get more subtle ... for a 3rd party product, it will still have to make a query call to BigQuery and exactly how the product makes the BigQuery call will give us an indication on the overall answer.

I see two possibilities:

1. The 3rd party application makes BigQuery API calls directly.  In this case, it would be up to the 3rd party product whether or not it exposes a mechanism to enable "dry run".  Technically, it could ... but it would be up to that product to determine how flag would be switched on.

2. The 3rd party application makes BigQuery API calls indirectly through JDBC/ODBC.  In this case, you are likely using the Magnitude Simba drivers described here.  I looked at both JDBC and ODBC and searched for "dry run" in their detailed specs and found nothing.  That seems to tell me that they have no "special" switches to enable dry run execution.

Putting all this together, I'm going to guess that you can't make a dry run call from a 3rd party app unless that app explicitly makes BigQuery API calls itself and provides explicit enablement for making dry-run requests.