- 3.39.0 (latest)
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.1
- 3.34.0
- 3.33.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.27.0
- 3.26.0
- 3.25.0
- 3.24.0
- 3.23.1
- 3.22.0
- 3.21.0
- 3.20.1
- 3.19.0
- 3.18.0
- 3.17.2
- 3.16.0
- 3.15.0
- 3.14.1
- 3.13.0
- 3.12.0
- 3.11.4
- 3.4.0
- 3.3.6
- 3.2.0
- 3.1.0
- 3.0.1
- 2.34.4
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.1
- 2.29.0
- 2.28.1
- 2.27.1
- 2.26.0
- 2.25.2
- 2.24.1
- 2.23.3
- 2.22.1
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.1
- 2.15.0
- 2.14.0
- 2.13.1
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.2
- 2.5.0
- 2.4.0
- 2.3.1
- 2.2.0
- 2.1.0
- 2.0.0
- 1.28.2
- 1.27.2
- 1.26.1
- 1.25.0
- 1.24.0
- 1.23.1
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
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.BigLakeFileFormat()
FILE_FORMAT_UNSPECIFIED( = 'FILE_FORMAT_UNSPECIFIED )
The default unspecified value.
PARQUET( = 'PARQUET )
Apache Parquet format.
class google.cloud.bigquery.enums.BigLakeTableFormat()
ICEBERG( = 'ICEBERG )
Apache Iceberg format.
TABLE_FORMAT_UNSPECIFIED( = 'TABLE_FORMAT_UNSPECIFIED )
The default unspecified value.
class google.cloud.bigquery.enums.Compression(value)
The compression type to use for exported files. The default value isNONE.
DEFLATE andSNAPPY areonly supported for Avro.
DEFLATE( = 'DEFLATE )
Specifies DEFLATE format.
GZIP( = 'GZIP )
Specifies GZIP format.
NONE( = 'NONE )
Specifies no compression.
SNAPPY( = 'SNAPPY )
Specifies SNAPPY format.
ZSTD( = 'ZSTD )
Specifies ZSTD format.
class google.cloud.bigquery.enums.CreateDisposition()
Specifies whether the job is allowed to create new tables. The defaultvalue isCREATE_IF_NEEDED.
Creation, truncation and append actions occur as one atomic updateupon 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 isreturned in the job result.
class google.cloud.bigquery.enums.DatasetView(value)
DatasetView specifies which dataset information is returned.
ACL( = 'ACL )
View ACL information for the dataset, which defines dataset accessfor one or more entities.
DATASET_VIEW_UNSPECIFIED( = 'DATASET_VIEW_UNSPECIFIED )
The default value. Currently maps to the FULL view.
FULL( = 'FULL )
View both dataset metadata and ACL information.
METADATA( = 'METADATA )
View metadata information for the dataset, such as friendlyName,description, labels, etc.
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.DefaultPandasDTypes(value)
Default Pandas DataFrem DTypes to convert BigQuery data. TheseSentinel values are used instead of None to maintain backward compatibility,and allow Pandas package is not available. For more information:https://stackoverflow.com/a/60605919/101923
BOOL_DTYPE( = <object object )
Specifies default bool dtype
DATE_DTYPE( = <object object )
Specifies default date dtype
INT_DTYPE( = <object object )
Specifies default integer dtype
RANGE_DATETIME_DTYPE( = <object object )
Specifies default range datetime dtype
RANGE_DATE_DTYPE( = <object object )
Specifies default range date dtype
RANGE_TIMESTAMP_DTYPE( = <object object )
Specifies default range timestamp dtype
TIME_DTYPE( = <object object )
Specifies default time dtype
class google.cloud.bigquery.enums.DestinationFormat()
The exported file format. The default value isCSV.
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 inputsalways 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 isUTF_8.
BigQuery decodes the data after the raw, binary data has beensplit 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.EntityTypes(value)
Enum of allowed entity type names in AccessEntry
DATASET( = 'dataset )
DOMAIN( = 'domain )
GROUP_BY_EMAIL( = 'groupByEmail )
IAM_MEMBER( = 'iamMember )
ROUTINE( = 'routine )
SPECIAL_GROUP( = 'specialGroup )
USER_BY_EMAIL( = 'userByEmail )
VIEW( = 'view )
class google.cloud.bigquery.enums.JobCreationMode()
Documented values for Job Creation Mode.
JOB_CREATION_MODE_UNSPECIFIED( = 'JOB_CREATION_MODE_UNSPECIFIED )
Job creation mode is unspecified.
JOB_CREATION_OPTIONAL( = 'JOB_CREATION_OPTIONAL )
Job creation is optional.
Returning immediate results is prioritized.BigQuery will automatically determine if a Job needs to be created.The conditions under which BigQuery can decide to not create a Job aresubject to change.
JOB_CREATION_REQUIRED( = 'JOB_CREATION_REQUIRED )
Job creation is always required.
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.QueryApiMethod(value)
API method used to start the query. The default value isINSERT.
INSERT( = 'INSERT )
Submit a query job by using thejobs.insert REST API method.
This supports all job configuration options.
QUERY( = 'QUERY )
Submit a query job by using thejobs.query REST API method.
Differences fromINSERT:
Many parameters and job configuration options, including job ID anddestination table, cannot be usedwith this API method. See thejobs.query REST API documentation forthe complete list of supported configuration options.
API blocks up to a specified timeout, waiting for the query tofinish.
The full job resource (including job statistics) may not be available.Call
reload()orget_job()to get full jobstatistics and configuration.query()can raise API exceptions ifthe query fails, whereas the same errors don’t appear until callingresult()when theINSERTAPI method is used.
class google.cloud.bigquery.enums.QueryPriority()
Specifies a priority for the query. The default value isINTERACTIVE.
BATCH( = 'BATCH )
Specifies batch priority.
INTERACTIVE( = 'INTERACTIVE )
Specifies interactive priority.
class google.cloud.bigquery.enums.RoundingMode(value)
Rounding mode options that can be used when storing NUMERIC or BIGNUMERICvalues.
ROUNDING_MODE_UNSPECIFIED: will default to using ROUND_HALF_AWAY_FROM_ZERO.
ROUND_HALF_AWAY_FROM_ZERO: rounds half values away from zero when applyingprecision and scale upon writing of NUMERIC and BIGNUMERIC values.For Scale: 0* 1.1, 1.2, 1.3, 1.4 => 1* 1.5, 1.6, 1.7, 1.8, 1.9 => 2
ROUND_HALF_EVEN: rounds half values to the nearest even value when applyingprecision and scale upon writing of NUMERIC and BIGNUMERIC values.For Scale: 0* 1.1, 1.2, 1.3, 1.4 => 1* 1.5 => 2* 1.6, 1.7, 1.8, 1.9 => 2* 2.5 => 2
ROUNDING_MODE_UNSPECIFIED( = 'ROUNDING_MODE_UNSPECIFIED )
ROUND_HALF_AWAY_FROM_ZERO( = 'ROUND_HALF_AWAY_FROM_ZERO )
ROUND_HALF_EVEN( = 'ROUND_HALF_EVEN )
class google.cloud.bigquery.enums.SchemaUpdateOption()
Specifies an update to the destination table schema as a side effect ofa 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.SourceColumnMatch(value)
Uses sensible defaults based on how the schema is provided.If autodetect is used, then columns are matched by name. Otherwise, columnsare matched by position. This is done to keep the behavior backward-compatible.
NAME( = 'NAME )
Matches by name. This reads the header row as column names and reorderscolumns to match the field names in the schema.
POSITION( = 'POSITION )
Matches by position. This assumes that the columns are ordered the sameway as the schema.
SOURCE_COLUMN_MATCH_UNSPECIFIED( = 'SOURCE_COLUMN_MATCH_UNSPECIFIED )
Unspecified column name match option.
class google.cloud.bigquery.enums.SourceFormat()
The format of the data files. The default value isCSV.
Note that the set of allowed values for loading data is differentthan the set used for external data sources (seeExternalSourceFormat).
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.SqlTypeNames(value)
Enum of allowed SQL type names in schema.SchemaField.
Datatype used in Legacy SQL.
BIGDECIMAL( = 'BIGNUMERIC )
BIGNUMERIC( = 'BIGNUMERIC )
BOOL( = 'BOOLEAN )
BOOLEAN( = 'BOOLEAN )
BYTES( = 'BYTES )
DATE( = 'DATE )
DATETIME( = 'DATETIME )
DECIMAL( = 'NUMERIC )
FLOAT( = 'FLOAT )
FLOAT64( = 'FLOAT )
FOREIGN( = 'FOREIGN )
GEOGRAPHY( = 'GEOGRAPHY )
INT64( = 'INTEGER )
INTEGER( = 'INTEGER )
INTERVAL( = 'INTERVAL )
NUMERIC( = 'NUMERIC )
RANGE( = 'RANGE )
RECORD( = 'RECORD )
STRING( = 'STRING )
STRUCT( = 'RECORD )
TIME( = 'TIME )
TIMESTAMP( = 'TIMESTAMP )
class google.cloud.bigquery.enums.StandardSqlTypeNames(value)
Enum of allowed SQL type names in schema.SchemaField.
Datatype used in GoogleSQL.
ARRAY( = 'ARRAY )
BIGNUMERIC( = 'BIGNUMERIC )
BOOL( = 'BOOL )
BYTES( = 'BYTES )
DATE( = 'DATE )
DATETIME( = 'DATETIME )
FLOAT64( = 'FLOAT64 )
FOREIGN( = 'FOREIGN )
GEOGRAPHY( = 'GEOGRAPHY )
INT64( = 'INT64 )
INTERVAL( = 'INTERVAL )
JSON( = 'JSON )
NUMERIC( = 'NUMERIC )
RANGE( = 'RANGE )
STRING( = 'STRING )
STRUCT( = 'STRUCT )
TIME( = 'TIME )
TIMESTAMP( = 'TIMESTAMP )
TYPE_KIND_UNSPECIFIED( = 'TYPE_KIND_UNSPECIFIED )
class google.cloud.bigquery.enums.UpdateMode(value)
Specifies the kind of information to update in a dataset.
UPDATE_ACL( = 'UPDATE_ACL )
Includes ACL information for the dataset, which defines dataset accessfor one or more entities.
UPDATE_FULL( = 'UPDATE_FULL )
Includes both dataset metadata and ACL information.
UPDATE_METADATA( = 'UPDATE_METADATA )
Includes metadata information for the dataset, such as friendlyName,description, labels, etc.
UPDATE_MODE_UNSPECIFIED( = 'UPDATE_MODE_UNSPECIFIED )
The default value. Behavior defaults to UPDATE_FULL.
class google.cloud.bigquery.enums.WriteDisposition()
Specifies the action that occurs if destination table already exists.
The default value isWRITE_APPEND.
Each action is atomic and only occurs if BigQuery is able to completethe job successfully. Creation, truncation and append actions occur as oneatomic 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 isreturned in the job result.
WRITE_TRUNCATE( = 'WRITE_TRUNCATE )
If the table already exists, BigQuery overwrites the table data.
WRITE_TRUNCATE_DATA( = 'WRITE_TRUNCATE_DATA )
For existing tables, truncate data but preserve existing schemaand constraints.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-16 UTC.