google.cloud.bigquery.job.QueryJobConfig#
Methods
|
Factory: construct a job configuration given its API representation |
Build an API representation of the query job config. |
Attributes
Allow large query results tables (legacy SQL, only) |
|
Fields defining clustering for the table |
|
Specifies behavior for creating tables. |
|
the default dataset to use for unqualified table names in the query or |
|
table where results are written or |
|
Custom encryption configuration for the destination table. |
|
|
|
Flatten nested/repeated fields in results. |
|
Labels for the job. |
|
Deprecated. |
|
Maximum bytes to be billed for this job or |
|
Priority of the query. |
|
list of parameters for parameterized query (empty by default) |
|
Specifies updates to the destination table schema to allow as a side effect of the query job. |
|
Dict[str, google.cloud.bigquery.external_config.ExternalConfig]: Definitions for external tables or |
|
Specifies time-based partitioning for the destination table. |
|
user defined function resources (empty by default) |
|
Use legacy SQL syntax. |
|
Look for the query result in the cache. |
|
Action that occurs if the destination table already exists. |
-
class
google.cloud.bigquery.job.
QueryJobConfig
(**kwargs)[source]# Bases:
google.cloud.bigquery.job._JobConfig
Configuration options for query jobs.
All properties in this class are optional. Values which are
None
-> server defaults. Set properties on the constructed configuration by using the property name as the name of a keyword argument.-
property
allow_large_results
# Allow large query results tables (legacy SQL, only)
See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.allowLargeResults
- Type
-
property
clustering_fields
# Fields defining clustering for the table
(Defaults to
None
).Clustering fields are immutable after table creation.
Note
As of 2018-06-29, clustering fields cannot be set on a table which does not also have time partioning defined.
-
property
create_disposition
# Specifies behavior for creating tables.
See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.createDisposition
-
property
default_dataset
# the default dataset to use for unqualified table names in the query or
None
if not set.The
default_dataset
setter accepts:a
Dataset
, ora
DatasetReference
, ora
str
of the fully-qualified dataset ID in standard SQL format. The value must included a project ID and dataset ID separated by.
. For example:your-project.your_dataset
.
See https://g.co/cloud/bigquery/docs/reference/v2/jobs#configuration.query.defaultDataset
-
property
destination
# table where results are written or
None
if not set.The
destination
setter accepts:a
Table
, ora
TableReference
, ora
str
of the fully-qualified table ID in standard SQL format. The value must included a project ID, dataset ID, and table ID, each separated by.
. For example:your-project.your_dataset.your_table
.
See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.destinationTable
-
property
destination_encryption_configuration
# Custom encryption configuration for the destination table.
Custom encryption configuration (e.g., Cloud KMS keys) or
None
if using default encryption.
-
property
dry_run
# True
if this query should be a dry run to estimate costs.See https://g.co/cloud/bigquery/docs/reference/v2/jobs#configuration.dryRun
- Type
-
property
flatten_results
# Flatten nested/repeated fields in results. (Legacy SQL only)
See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.flattenResults
- Type
-
classmethod
from_api_repr
(resource)# Factory: construct a job configuration given its API representation
- Parameters
resource (dict) – An extract job configuration in the same representation as is returned from the API.
- Return type
google.cloud.bigquery.job._JobConfig
- Returns
Configuration parsed from
resource
.
-
property
labels
# Labels for the job.
This method always returns a dict. To change a job’s labels, modify the dict, then call
Client.update_job
. To delete a label, set its value toNone
before updating.- Raises
ValueError – If
value
type is invalid.- Type
-
property
maximum_billing_tier
# Deprecated. Changes the billing tier to allow high-compute queries.
See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.maximumBillingTier
- Type
-
property
maximum_bytes_billed
# Maximum bytes to be billed for this job or
None
if not set.See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.maximumBytesBilled
- Type
-
property
priority
# Priority of the query.
See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.priority
-
property
query_parameters
# list of parameters for parameterized query (empty by default)
See: https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.queryParameters
-
property
schema_update_options
# Specifies updates to the destination table schema to allow as a side effect of the query job.
- Type
-
property
table_definitions
# Dict[str, google.cloud.bigquery.external_config.ExternalConfig]: Definitions for external tables or
None
if not set.See https://g.co/cloud/bigquery/docs/reference/rest/v2/jobs#configuration.query.tableDefinitions
-
property
time_partitioning
# Specifies time-based partitioning for the destination table.
-
to_api_repr
()[source]# Build an API representation of the query job config.
- Returns
A dictionary in the format used by the BigQuery API.
- Return type
-
property
udf_resources
# user defined function resources (empty by default)
- Type
-
property
use_legacy_sql
# Use legacy SQL syntax.
See https://g.co/cloud/bigquery/docs/reference/v2/jobs#configuration.query.useLegacySql
- Type
-
property
use_query_cache
# Look for the query result in the cache.
See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query.useQueryCache
- Type
-
property
write_disposition
# Action that occurs if the destination table already exists.
See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query.writeDisposition
-
property