Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigQuery: Add maximum_bytes_billed option to magics #7678

Closed
tswast opened this issue Apr 8, 2019 · 0 comments · Fixed by #8179
Closed

BigQuery: Add maximum_bytes_billed option to magics #7678

tswast opened this issue Apr 8, 2019 · 0 comments · Fixed by #8179
Assignees
Labels
api: bigquery Issues related to the BigQuery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@tswast
Copy link
Contributor

tswast commented Apr 8, 2019

Background

BigQuery queries can get expensive, but the maximum_bytes_billed query option adds a cap to the price billed and rejects queries that could be too expensive. Provide a default value for maximum_bytes_billed when constructing a client by specifying a default_query_job_config, but this is not possible when using the %%bigquery magics.

Feature Request

Add a --maximum_bytes_billed option to %%bigquery. Possible values:

  • UNSPECIFIED - Use the default value . Set job_config.maximum_bytes_billed = google.cloud.bigquery.magics.context.maximum_bytes_billed.
  • --maximum_bytes_billed=None - No maximum value. Set job_config.maximum_bytes_billed = None. This allows all queries to run, overriding any value from the global context.
  • --maximum_bytes_billed=123456789 - Set maximum to value specified. Set job_config.maximum_bytes_billed = int(value).
  • --maximum_bytes_billed=NotAnInteger - Raise ValueError.
@tswast tswast added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: bigquery Issues related to the BigQuery API. labels Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant