BigQuery: Add maximum_bytes_billed option to magics #7678
Labels
api: bigquery
Issues related to the BigQuery API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
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 formaximum_bytes_billed
when constructing a client by specifying adefault_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 . Setjob_config.maximum_bytes_billed = google.cloud.bigquery.magics.context.maximum_bytes_billed
.--maximum_bytes_billed=None
- No maximum value. Setjob_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. Setjob_config.maximum_bytes_billed = int(value)
.--maximum_bytes_billed=NotAnInteger
- RaiseValueError
.The text was updated successfully, but these errors were encountered: