googleapis / googleapis/google-cloud-go

bigquery: an option to disable fallback to `GetQueryResults` if `storage API` is enabled

Open
#8,530 3 comments 1 reaction 2 assignees Claimed by @alvarowolfx View on GitHub
api: bigquery priority: p2 type: feature request
Dominant language
Go
Stars
4.5k
Forks
1.6k
Avg merge
1d 13h
Merged PRs (30d)
109

Description

**Is your feature request related to a problem? Please describe.**
The BigQuery storage API is a lot faster and preferable for bigger datasets. Currently even if a user enables the storage client, the SDK can still fallback to `GetQueryResults` API in certain cases like `bigquery.readsessions.create` permission not available. These kind of fallbacks are not in user's control and it can be very slow to download bigger results if storage API is not enabled.

**Describe the solution you'd like**
An option to control this fallback. If fallback is disabled and storage API is not available the query should not fallback to `GetQueryResults` API and should return the reason for storage API read failure.

**Describe alternatives you've considered**
The `RowIterator` exposes a `IsAccelerated` method to check if storage API is not available but it can also be false if results are small and available in `QueryResponse`

**Additional context**
None

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.