google.cloud.bigquery.job.CopyJobConfig#

Methods

from_api_repr(resource)

Factory: construct a job configuration given its API representation

to_api_repr()

Build an API representation of the job config.

Attributes

create_disposition

Specifies behavior for creating tables.

destination_encryption_configuration

Custom encryption configuration for the destination table.

labels

Labels for the job.

write_disposition

Action that occurs if the destination table already exists.


class google.cloud.bigquery.job.CopyJobConfig(**kwargs)[source]#

Bases: google.cloud.bigquery.job._JobConfig

Configuration options for copy 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 create_disposition#

Specifies behavior for creating tables.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.copy.createDisposition

Type

google.cloud.bigquery.job.CreateDisposition

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.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.copy.destinationEncryptionConfiguration

Type

google.cloud.bigquery.table.EncryptionConfiguration

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 to None before updating.

Raises

ValueError – If value type is invalid.

Type

Dict[str, str]

to_api_repr()#

Build an API representation of the job config.

Return type

dict

Returns

A dictionary in the format used by the BigQuery API.

property write_disposition#

Action that occurs if the destination table already exists.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.copy.writeDisposition

Type

google.cloud.bigquery.job.WriteDisposition