bigframes._config.ComputeOptions#
- class bigframes._config.ComputeOptions(ai_ops_confirmation_threshold: int | None = 0, ai_ops_threshold_autofail: bool = False, allow_large_results: bool | None = None, enable_multi_query_execution: bool = False, maximum_bytes_billed: int | None = None, maximum_result_rows: int | None = None, semantic_ops_confirmation_threshold: int | None = 0)[source]#
Encapsulates the configuration for compute options.
Examples:
>>> import bigframes.pandas as bpd >>> df = bpd.read_gbq("bigquery-public-data.ml_datasets.penguins")
>>> bpd.options.compute.maximum_bytes_billed = 500 >>> df.to_pandas() # this should fail google.api_core.exceptions.InternalServerError: 500 Query exceeded limit for bytes billed: 500. 10485760 or higher required.
>>> bpd.options.compute.maximum_bytes_billed = None # reset option
To add multiple extra labels to a query configuration, use the assign_extra_query_labels method with keyword arguments:
>>> bpd.options.compute.assign_extra_query_labels(test1=1, test2="abc") >>> bpd.options.compute.extra_query_labels {'test1': 1, 'test2': 'abc'}
Alternatively, you can add labels individually by directly accessing the extra_query_labels dictionary:
>>> bpd.options.compute.extra_query_labels["test3"] = False >>> bpd.options.compute.extra_query_labels {'test1': 1, 'test2': 'abc', 'test3': False}
To remove a label from the configuration, use the del keyword on the desired label key:
>>> del bpd.options.compute.extra_query_labels["test1"] >>> bpd.options.compute.extra_query_labels {'test2': 'abc', 'test3': False}
Attributes
Guards against unexpected processing of large amount of rows by semantic operators.
Guards against unexpected processing of large amount of rows by semantic operators.
Specifies whether query results can exceed 10 GB.
If enabled, large queries may be factored into multiple smaller queries.
Limits the bytes billed for query jobs.
Limits the number of rows in an execution result.
Deprecated.
Deprecated.
Stores additional custom labels for query configuration.
Methods
__init__([ai_ops_confirmation_threshold, ...])assign_extra_query_labels(**kwargs)Assigns additional custom labels for query configuration.