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.

operation_type

The operation to perform with this copy job.

write_disposition

Action that occurs if the destination table already exists.

__setattr__(name, value)

Override to be able to raise error if an unknown property is being set

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: dict)google.cloud.bigquery.job.base._JobConfig

Factory: construct a job configuration given its API representation

Parameters

resource (Dict) – A 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. Once a job has been created on the server, its labels cannot be modified anymore.

Raises

ValueError – If value type is invalid.

Type

Dict[str, str]

property operation_type: str

The operation to perform with this copy job.

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

to_api_repr()dict

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