BigQuery Enums

class google.cloud.bigquery.enums.AutoRowIDs(value)

How to handle automatic insert IDs when inserting rows as a stream.

DISABLED( = )

GENERATE_UUID( = )

class google.cloud.bigquery.enums.Compression()

The compression type to use for exported files. The default value is NONE.

DEFLATE and SNAPPY are only supported for Avro.

DEFLATE( = 'DEFLATE )

Specifies DEFLATE format.

GZIP( = 'GZIP )

Specifies GZIP format.

NONE( = 'NONE )

Specifies no compression.

SNAPPY( = 'SNAPPY )

Specifies SNAPPY format.

class google.cloud.bigquery.enums.CreateDisposition()

Specifies whether the job is allowed to create new tables. The default value is CREATE_IF_NEEDED.

Creation, truncation and append actions occur as one atomic update upon job completion.

CREATE_IF_NEEDED( = 'CREATE_IF_NEEDED )

If the table does not exist, BigQuery creates the table.

CREATE_NEVER( = 'CREATE_NEVER )

The table must already exist. If it does not, a ‘notFound’ error is returned in the job result.

class google.cloud.bigquery.enums.DecimalTargetType()

The data types that could be used as a target type when converting decimal values.

https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#DecimalTargetType

Versionadded: New in version 2.21.0.

BIGNUMERIC( = 'BIGNUMERIC )

Decimal values could be converted to BIGNUMERIC type.

NUMERIC( = 'NUMERIC )

Decimal values could be converted to NUMERIC type.

STRING( = 'STRING )

Decimal values could be converted to STRING type.

class google.cloud.bigquery.enums.DestinationFormat()

The exported file format. The default value is CSV.

Tables with nested or repeated fields cannot be exported as CSV.

AVRO( = 'AVRO )

Specifies Avro format.

CSV( = 'CSV )

Specifies CSV format.

NEWLINE_DELIMITED_JSON( = 'NEWLINE_DELIMITED_JSON )

Specifies newline delimited JSON format.

PARQUET( = 'PARQUET )

Specifies Parquet format.

class google.cloud.bigquery.enums.DeterminismLevel()

Specifies determinism level for JavaScript user-defined functions (UDFs).

https://cloud.google.com/bigquery/docs/reference/rest/v2/routines#DeterminismLevel

DETERMINISM_LEVEL_UNSPECIFIED( = 'DETERMINISM_LEVEL_UNSPECIFIED )

The determinism of the UDF is unspecified.

DETERMINISTIC( = 'DETERMINISTIC )

The UDF is deterministic, meaning that 2 function calls with the same inputs always produce the same result, even across 2 query runs.

NOT_DETERMINISTIC( = 'NOT_DETERMINISTIC )

The UDF is not deterministic.

class google.cloud.bigquery.enums.Encoding()

The character encoding of the data. The default is UTF_8.

BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.

ISO_8859_1( = 'ISO-8859-1 )

Specifies ISO-8859-1 encoding.

UTF_8( = 'UTF-8 )

Specifies UTF-8 encoding.

class google.cloud.bigquery.enums.KeyResultStatementKind()

Determines which statement in the script represents the “key result”.

The “key result” is used to populate the schema and query results of the script job.

https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#keyresultstatementkind

FIRST_SELECT( = 'FIRST_SELECT )

KEY_RESULT_STATEMENT_KIND_UNSPECIFIED( = 'KEY_RESULT_STATEMENT_KIND_UNSPECIFIED )

LAST( = 'LAST )

class google.cloud.bigquery.enums.QueryPriority()

Specifies a priority for the query. The default value is INTERACTIVE.

BATCH( = 'BATCH )

Specifies batch priority.

INTERACTIVE( = 'INTERACTIVE )

Specifies interactive priority.

class google.cloud.bigquery.enums.SchemaUpdateOption()

Specifies an update to the destination table schema as a side effect of a load job.

ALLOW_FIELD_ADDITION( = 'ALLOW_FIELD_ADDITION )

Allow adding a nullable field to the schema.

ALLOW_FIELD_RELAXATION( = 'ALLOW_FIELD_RELAXATION )

Allow relaxing a required field in the original schema to nullable.

class google.cloud.bigquery.enums.SourceFormat()

The format of the data files. The default value is CSV.

Note that the set of allowed values for loading data is different than the set used for external data sources (see ExternalSourceFormat).

AVRO( = 'AVRO )

Specifies Avro format.

CSV( = 'CSV )

Specifies CSV format.

DATASTORE_BACKUP( = 'DATASTORE_BACKUP )

Specifies datastore backup format

NEWLINE_DELIMITED_JSON( = 'NEWLINE_DELIMITED_JSON )

Specifies newline delimited JSON format.

ORC( = 'ORC )

Specifies Orc format.

PARQUET( = 'PARQUET )

Specifies Parquet format.

class google.cloud.bigquery.enums.SqlParameterScalarTypes()

Supported scalar SQL query parameter types as type objects.

BIGDECIMAL( = ScalarQueryParameterType('BIGNUMERIC' )

BIGNUMERIC( = ScalarQueryParameterType('BIGNUMERIC' )

BOOL( = ScalarQueryParameterType('BOOL' )

BOOLEAN( = ScalarQueryParameterType('BOOL' )

BYTES( = ScalarQueryParameterType('BYTES' )

DATE( = ScalarQueryParameterType('DATE' )

DATETIME( = ScalarQueryParameterType('DATETIME' )

DECIMAL( = ScalarQueryParameterType('NUMERIC' )

FLOAT( = ScalarQueryParameterType('FLOAT64' )

FLOAT64( = ScalarQueryParameterType('FLOAT64' )

GEOGRAPHY( = ScalarQueryParameterType('GEOGRAPHY' )

INT64( = ScalarQueryParameterType('INT64' )

INTEGER( = ScalarQueryParameterType('INT64' )

NUMERIC( = ScalarQueryParameterType('NUMERIC' )

STRING( = ScalarQueryParameterType('STRING' )

TIME( = ScalarQueryParameterType('TIME' )

TIMESTAMP( = ScalarQueryParameterType('TIMESTAMP' )

class google.cloud.bigquery.enums.SqlTypeNames(value)

Enum of allowed SQL type names in schema.SchemaField.

BIGDECIMAL( = 'BIGNUMERIC )

BIGNUMERIC( = 'BIGNUMERIC )

BOOL( = 'BOOLEAN )

BOOLEAN( = 'BOOLEAN )

BYTES( = 'BYTES )

DATE( = 'DATE )

DATETIME( = 'DATETIME )

DECIMAL( = 'NUMERIC )

FLOAT( = 'FLOAT )

FLOAT64( = 'FLOAT )

GEOGRAPHY( = 'GEOGRAPHY )

INT64( = 'INTEGER )

INTEGER( = 'INTEGER )

NUMERIC( = 'NUMERIC )

RECORD( = 'RECORD )

STRING( = 'STRING )

STRUCT( = 'RECORD )

TIME( = 'TIME )

TIMESTAMP( = 'TIMESTAMP )

class google.cloud.bigquery.enums.StandardSqlDataTypes(value)

An Enum of scalar SQL types.

BIGNUMERIC( = 2 )

BOOL( = )

BYTES( = )

DATE( = 1 )

DATETIME( = 2 )

FLOAT64( = )

GEOGRAPHY( = 2 )

INT64( = )

INTERVAL( = 2 )

JSON( = 2 )

NUMERIC( = 2 )

STRING( = )

TIME( = 2 )

TIMESTAMP( = 1 )

class google.cloud.bigquery.enums.WriteDisposition()

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.

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.