Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

bigquery client issue

Hi all, We would love to know if several BigQuery clients that are running in a multiprocessing pool share a query cache. Additionally, after the BigQuery client runs its query process and gets closed, is the coming/newly created client considered as a new connection?

Solved Solved
0 1 352
1 ACCEPTED SOLUTION

From the Using cached query results documentation

BigQuery writes all query results to a table. The table is either explicitly identified by the user (a destination table), or it is a temporary, cached results table. Temporary, cached results tables are maintained per-user, per-project.

How cached results are stored

When you run a query, a temporary, cached results table is created in a special dataset referred to as an "anonymous dataset".

Ensuring use of the cache

If you use the jobs.insert method to run a query, you can force a query job to fail unless cached results can be used by setting the createDisposition property of the query job configuration to CREATE_NEVER.


From the documentation Terminating sessions

A session can be terminated manually or automatically. The history of a terminated session is available for 20 days after termination.

Auto-terminate a session

A session is terminated automatically after 24 hours of inactivity or after 7 days, whichever happens first.

View solution in original post

1 REPLY 1

From the Using cached query results documentation

BigQuery writes all query results to a table. The table is either explicitly identified by the user (a destination table), or it is a temporary, cached results table. Temporary, cached results tables are maintained per-user, per-project.

How cached results are stored

When you run a query, a temporary, cached results table is created in a special dataset referred to as an "anonymous dataset".

Ensuring use of the cache

If you use the jobs.insert method to run a query, you can force a query job to fail unless cached results can be used by setting the createDisposition property of the query job configuration to CREATE_NEVER.


From the documentation Terminating sessions

A session can be terminated manually or automatically. The history of a terminated session is available for 20 days after termination.

Auto-terminate a session

A session is terminated automatically after 24 hours of inactivity or after 7 days, whichever happens first.