As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

google.cloud.bigquery.job.CopyJobConfig

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

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.

__init__(**kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(**kwargs)

Initialize self.

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.

property create_disposition

Specifies behavior for creating tables.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationTableCopy.FIELDS.create_disposition

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/Job#JobConfigurationTableCopy.FIELDS.destination_encryption_configuration

Type

google.cloud.bigquery.encryption_configuration.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.

Returns

Configuration parsed from resource.

Return type

google.cloud.bigquery.job._JobConfig

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.

Returns

A dictionary in the format used by the BigQuery API.

Return type

Dict

property write_disposition

Action that occurs if the destination table already exists.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationTableCopy.FIELDS.write_disposition

Type

google.cloud.bigquery.job.WriteDisposition