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.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.