On January 1, 2020 this library will no longer support Python 2 on the latest released version. Previously released library versions will continue to be available. For more information please visit Python 2 support on Google Cloud.

google.cloud.bigquery.job.WriteDisposition

class google.cloud.bigquery.job.WriteDisposition[source]

Specifies the action that occurs if destination table already exists.

The default value is WRITE_APPEND.

Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.

__init__()

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

Methods

__init__

Initialize self.

Attributes

WRITE_APPEND

If the table already exists, BigQuery appends the data to the table.

WRITE_EMPTY

If the table already exists and contains data, a ‘duplicate’ error is returned in the job result.

WRITE_TRUNCATE

If the table already exists, BigQuery overwrites the table data.

WRITE_APPEND = 'WRITE_APPEND'

If the table already exists, BigQuery appends the data to the table.

WRITE_EMPTY = 'WRITE_EMPTY'

If the table already exists and contains data, a ‘duplicate’ error is returned in the job result.

WRITE_TRUNCATE = 'WRITE_TRUNCATE'

If the table already exists, BigQuery overwrites the table data.