Package Classes (3.34.0)

Summary of entries of Classes for bigquery.

Classes

Client

Client to bundle configuration needed for API requests.

Project

Wrapper for resource describing a BigQuery project.

AccessEntry

Represents grant of an access role to an entity.

An entry must have exactly one of the allowedxref_EntityTypes. If anything butview,routine,ordataset are set, arole is also required.role is omitted forview,routine,dataset, because they are always read-only.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/datasets.

Condition

Represents a textual expression in the Common Expression Language (CEL) syntax.

Typically used for filtering or policy rules, such as in IAM Conditionsor BigQuery row/column access policies.

See:https://cloud.google.com/iam/docs/reference/rest/Shared.Types/Exprhttps://github.com/google/cel-spec

Dataset

Datasets are containers for tables.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#resource-dataset

DatasetListItem

A read-only dataset resource from a list operation.

For performance reasons, the BigQuery API only includes some of thedataset properties when listing datasets. Notably,xref_access_entries is missing.

For a full list of the properties that the BigQuery API returns, see theREST documentation for datasets.list<https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/list>_.

DatasetReference

DatasetReferences are pointers to datasets.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference

Connection

DB-API Connection to Google BigQuery.

Cursor

DB-API Cursor to Google BigQuery.

DataError

DB-API error due to problems with the processed data.

DatabaseError

DB-API error related to the database.

Error

Exception representing all non-warning DB-API errors.

IntegrityError

DB-API error when integrity of the database is affected.

InterfaceError

DB-API error related to the database interface.

InternalError

DB-API error when the database encounters an internal error.

NotSupportedError

DB-API error for operations not supported by the database or API.

OperationalError

DB-API error related to the database operation.

These errors are not necessarily under the control of the programmer.

ProgrammingError

DB-API exception raised for programming errors.

Warning

Exception raised for important DB-API warnings.

EncryptionConfiguration

Custom encryption configuration (e.g., Cloud KMS keys).

AutoRowIDs

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

BigLakeFileFormat

API documentation forbigquery.enums.BigLakeFileFormat class.

BigLakeTableFormat

API documentation forbigquery.enums.BigLakeTableFormat class.

Compression

The compression type to use for exported files. The default value isNONE.

DEFLATE andSNAPPY areonly supported for Avro.

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.

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:: 2.21.0

DefaultPandasDTypes

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

DestinationFormat

The exported file format. The default value isCSV.

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

DeterminismLevel

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

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

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.

EntityTypes

Enum of allowed entity type names in AccessEntry

JobCreationMode

Documented values for Job Creation Mode.

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

QueryApiMethod

API method used to start the query. The default value isINSERT.

QueryPriority

Specifies a priority for the query. The default value isINTERACTIVE.

RoundingMode

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

SchemaUpdateOption

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

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

SqlTypeNames

Enum of allowed SQL type names in schema.SchemaField.

Datatype used in Legacy SQL.

StandardSqlTypeNames

Enum of allowed SQL type names in schema.SchemaField.

Datatype used in GoogleSQL.

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.

BigtableColumn

Options for a Bigtable column.

BigtableColumnFamily

Options for a Bigtable column family.

BigtableOptions

Options that describe how to treat Bigtable tables as BigQuery tables.

CSVOptions

Options that describe how to treat CSV files as BigQuery tables.

ExternalCatalogDatasetOptions

Options defining open source compatible datasets living in the BigQuery catalog.Contains metadata of open source database, schema or namespace representedby the current dataset.

ExternalCatalogTableOptions

Metadata about open source compatible table. The fields contained in theseoptions correspond to hive metastore's table level properties.

ExternalConfig

Description of an external data source.

ExternalSourceFormat

The format for external data files.

Note that the set of allowed values for external data sources is differentthan the set used for loading data (seeSourceFormat).

GoogleSheetsOptions

Options that describe how to treat Google Sheets as BigQuery tables.

HivePartitioningOptions

[Beta] Options that configure hive partitioning.

Note:Experimental. This feature is experimental and might change orhave limited support.Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/tables#HivePartitioningOptions

AvroOptions

Options if source format is set to AVRO.

ParquetOptions

Additional options if the PARQUET source format is used.

Compression

The compression type to use for exported files. The default value isNONE.

DEFLATE andSNAPPY areonly supported for Avro.

CopyJob

Asynchronous job: copy data into a table from other tables.

CopyJobConfig

Configuration options for copy jobs.

All properties in this class are optional. Values which are :data:None ->server defaults. Set properties on the constructed configuration by usingthe property name as the name of a keyword argument.

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.

DestinationFormat

The exported file format. The default value isCSV.

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

DmlStats

Detailed statistics for DML statements.

https://cloud.google.com/bigquery/docs/reference/rest/v2/DmlStats

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.

ExtractJob

Asynchronous job: extract data from a table into Cloud Storage.

ExtractJobConfig

Configuration options for extract jobs.

All properties in this class are optional. Values which are :data:None ->server defaults. Set properties on the constructed configuration by usingthe property name as the name of a keyword argument.

LoadJob

Asynchronous job for loading data into a table.

Can load from Google Cloud Storage URIs or from a file.

LoadJobConfig

Configuration options for load jobs.

Set properties on the constructed configuration by using the property nameas the name of a keyword argument. Values which are unset or :data:Noneuse the BigQuery REST API default values. See theBigQuery REST APIreference documentation<https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationLoad>_for a list of default values.

Required options differ based on thesource_format value.For example, the BigQuery API's default value forsource_format is"CSV".When loading a CSV file, eitherschema must be set orautodetect must be set to:data:True.

OperationType

Different operation types supported in table copy job.

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

QueryJob

Asynchronous job: query tables.

QueryJobConfig

Configuration options for query jobs.

All properties in this class are optional. Values which are :data:None ->server defaults. Set properties on the constructed configuration by usingthe property name as the name of a keyword argument.

QueryPlanEntry

QueryPlanEntry represents a single stage of a query execution plan.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/Job#ExplainQueryStagefor the underlying API representation within query statistics.

QueryPlanEntryStep

Map a single step in a query plan entry.

QueryPriority

Specifies a priority for the query. The default value isINTERACTIVE.

ReservationUsage

Job resource usage for a reservation.

SchemaUpdateOption

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

ScriptOptions

Options controlling the execution of scripts.

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

ScriptStackFrame

Stack frame showing the line/column/procedure name where the currentevaluation happened.

ScriptStatistics

Statistics for a child job of a script.

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

TimelineEntry

TimelineEntry represents progress of a query job at a particularpoint in time.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/Job#querytimelinesamplefor the underlying API representation within query statistics.

TransactionInfo

[Alpha] Information of a multi-statement transaction.

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

.. versionadded:: 2.24.0

UnknownJob

A job whose type cannot be determined.

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.

ReservationUsage

Job resource usage for a reservation.

ScriptStackFrame

Stack frame showing the line/column/procedure name where the currentevaluation happened.

ScriptStatistics

Statistics for a child job of a script.

SessionInfo

[Preview] Information of the session if this job is part of one.

.. versionadded:: 2.29.0

TransactionInfo

[Alpha] Information of a multi-statement transaction.

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

.. versionadded:: 2.24.0

UnknownJob

A job whose type cannot be determined.

Model

Model represents a machine learning model resource.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/models

ModelReference

ModelReferences are pointers to models.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/models#modelreference

TransformColumn

TransformColumn represents a transform column feature.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/models#transformcolumn

ArrayQueryParameter

Named / positional query parameters for array values.

ArrayQueryParameterType

Type representation for array query parameters.

ConnectionProperty

A connection-level property to customize query behavior.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/ConnectionProperty

RangeQueryParameter

Named / positional query parameters for range values.

RangeQueryParameterType

Type representation for range query parameters.

ScalarQueryParameter

Named / positional query parameters for scalar values.

ScalarQueryParameterType

Type representation for scalar query parameters.

SqlParameterScalarTypes

Supported scalar SQL query parameter types as type objects.

StructQueryParameter

Name / positional query parameters for struct values.

StructQueryParameterType

Type representation for struct query parameters.

UDFResource

Describe a single user-defined function (UDF) resource.

DeterminismLevel

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

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

RemoteFunctionOptions

Configuration options for controlling remote BigQuery functions.

Routine

Resource representing a user-defined routine.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/routines

RoutineArgument

Input/output argument of a function or a stored procedure.

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

RoutineReference

A pointer to a routine.

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

RoutineType

The fine-grained type of the routine.

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

.. versionadded:: 2.22.0

FieldElementType

Represents the type of a field element.

ForeignTypeInfo

Metadata about the foreign data type definition such as the system in which thetype is defined.

PolicyTagList

Define Policy Tags for a column.

SchemaField

Describe a single field within a table schema.

SerDeInfo

Serializer and deserializer information.

StorageDescriptor

Contains information about how a table's data is stored and accessed by opensource query engines.

StandardSqlDataType

The type of a variable, e.g., a function argument.

See:https://cloud.google.com/bigquery/docs/reference/rest/v2/StandardSqlDataType

Examples:

INT64: {type_kind="INT64"}ARRAY: {type_kind="ARRAY", array_element_type="STRING"}STRUCT<x STRING, y ARRAY>: {    type_kind="STRUCT",    struct_type={        fields=[            {name="x", type={type_kind="STRING"}},            {                name="y",                type={type_kind="ARRAY", array_element_type="DATE"}            }        ]    }}RANGE: {type_kind="RANGE", range_element_type="DATETIME"}

StandardSqlField

A field or a column.

See:https://cloud.google.com/bigquery/docs/reference/rest/v2/StandardSqlField

StandardSqlStructType

Type of a struct field.

See:https://cloud.google.com/bigquery/docs/reference/rest/v2/StandardSqlDataType#StandardSqlStructType

StandardSqlTableType

A table type.

See:https://cloud.google.com/workflows/docs/reference/googleapis/bigquery/v2/Overview#StandardSqlTableType

BigLakeConfiguration

Configuration for managed tables for Apache Iceberg, formerly known as BigLake.

CloneDefinition

Information about base table and clone time of the clone.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/tables#clonedefinition

ColumnReference

The pair of the foreign key column and primary key column.

ForeignKey

Represents a foreign key constraint on a table's columns.

PartitionRange

Definition of the ranges for range partitioning.

Note:Beta. The integer range partitioning feature is in a pre-releasestate and might change or have limited support.

PrimaryKey

Represents the primary key constraint on a table's columns.

RangePartitioning

Range-based partitioning configuration for a table.

Note:Beta. The integer range partitioning feature is in a pre-releasestate and might change or have limited support.

Row

A BigQuery row.

Values can be accessed by position (index), by key like a dict,or as properties.

RowIterator

A class for iterating through HTTP/JSON API row list responses.

SnapshotDefinition

Information about base table and snapshot time of the snapshot.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/tables#snapshotdefinition

StreamingBuffer

Information about a table's streaming buffer.

Seehttps://cloud.google.com/bigquery/streaming-data-into-bigquery.

Table

Tables represent a set of rows whose values correspond to a schema.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/tables#resource-table

TableConstraints

The TableConstraints defines the primary key and foreign key.

TableListItem

A read-only table resource from a list operation.

For performance reasons, the BigQuery API only includes some of the tableproperties when listing tables. Notably,xref_schema andxref_num_rows are missing.

For a full list of the properties that the BigQuery API returns, see theREST documentation for tables.list<https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/list>_.

TableReference

TableReferences are pointers to tables.

Seehttps://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablereference

TimePartitioning

Configures time-based partitioning for a table.

TimePartitioningType

Specifies the type of time partitioning to perform.

DeleteModelRequest

EncryptionConfiguration

GetModelRequest

ListModelsRequest

ListModelsResponse

Model

AggregateClassificationMetrics

Aggregate metrics for classification/classifier models. Formulti-class models, the metrics are either macro-averaged ormicro-averaged. When macro-averaged, the metrics are calculatedfor each label and then an unweighted average is taken of thosevalues. When micro-averaged, the metric is calculated globallyby counting the total number of correctly predicted rows.

ArimaFittingMetrics

ARIMA model fitting metrics.

ArimaForecastingMetrics

Model evaluation metrics for ARIMA forecasting models.

ArimaSingleModelForecastingMetrics

Model evaluation metrics for a single ARIMA forecastingmodel.

ArimaOrder

Arima order, can be used for both non-seasonal and seasonalparts.

BinaryClassificationMetrics

Evaluation metrics for binary classification/classifiermodels.

BinaryConfusionMatrix

Confusion matrix for binary classification models.

ClusteringMetrics

Evaluation metrics for clustering models.

Cluster

Message containing the information about one cluster.

FeatureValue

Representative value of a single feature within the cluster.

This message hasoneof_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.

.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

CategoricalValue

Representative value of a categorical feature.

CategoryCount

Represents the count of a single category within the cluster.

DataFrequency

Type of supported data frequency for time series forecastingmodels.

DataSplitMethod

Indicates the method to split input data into multipletables.

DataSplitResult

Data split result. This contains references to the trainingand evaluation data tables that were used to train the model.

DistanceType

Distance metric used to compute the distance between twopoints.

EvaluationMetrics

Evaluation metrics of a model. These are either computed onall training data or just the eval data based on whether evaldata was used during training. These are not present forimported models.

This message hasoneof_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.

.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

FeedbackType

Indicates the training algorithm to use for matrixfactorization models.

GlobalExplanation

Global explanations containing the top most importantfeatures after training.

Explanation

Explanation for a single feature.

HolidayRegion

Type of supported holiday regions for time series forecastingmodels.

KmeansEnums

API documentation forbigquery_v2.types.Model.KmeansEnums class.

KmeansInitializationMethod

Indicates the method used to initialize the centroids forKMeans clustering algorithm.

LabelsEntry

The abstract base class for a message.

LearnRateStrategy

Indicates the learning rate optimization strategy to use.

LossType

Loss metric to evaluate model training performance.

ModelType

Indicates the type of the Model.

MultiClassClassificationMetrics

Evaluation metrics for multi-class classification/classifiermodels.

ConfusionMatrix

Confusion matrix for multi-class classification models.

Entry

A single entry in the confusion matrix.

Row

A single row in the confusion matrix.

OptimizationStrategy

Indicates the optimization strategy used for training.

RankingMetrics

Evaluation metrics used by weighted-ALS models specified byfeedback_type=implicit.

RegressionMetrics

Evaluation metrics for regression and explicit feedback typematrix factorization models.

SeasonalPeriod

API documentation forbigquery_v2.types.Model.SeasonalPeriod class.

SeasonalPeriodType

API documentation forbigquery_v2.types.Model.SeasonalPeriod.SeasonalPeriodType class.

TrainingRun

Information about a single training query run for the model.

IterationResult

Information about a single iteration of the training run.

ArimaResult

(Auto-)arima fitting result. Wrap everything in ArimaResultfor easier refactoring if we want to use model-specificiteration results.

ArimaCoefficients

Arima coefficients.

ArimaModelInfo

Arima model information.

ClusterInfo

Information about a single cluster for clustering model.

TrainingOptions

Options used in model training.

LabelClassWeightsEntry

The abstract base class for a message.

ModelReference

Id path of a model.

PatchModelRequest

StandardSqlDataType

The type of a variable, e.g., a function argument. Examples: INT64:{type_kind="INT64"} ARRAY: {type_kind="ARRAY",array_element_type="STRING"} STRUCT<x STRING, y ARRAY>:{type_kind="STRUCT", struct_type={fields=[ {name="x",type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY",array_element_type="DATE"}} ]}}

This message hasoneof_ fields (mutually exclusive fields).For each oneof, at most one member field can be set at the same time.Setting any member of the oneof automatically clears all othermembers.

.. _oneof:https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

TypeKind

API documentation forbigquery_v2.types.StandardSqlDataType.TypeKind class.

StandardSqlField

A field or a column.

StandardSqlStructType

StandardSqlTableType

A table type

TableReference

Modules

client

Client for interacting with the Google BigQuery API.

dataset

Define API Datasets.

encryption_configuration

Define class for the custom encryption configuration.

enums

API documentation forbigquery.enums module.

external_config

Define classes that describe external data sources.

These are used for both Table.externalDataConfiguration andJob.configuration.query.tableDefinitions.

format_options

API documentation forbigquery.format_options module.

base

Base classes and helpers for job classes.

model

Define resources for the BigQuery ML Models API.

query

BigQuery query processing.

retry

API documentation forbigquery.retry module.

schema

Schemas for BigQuery tables / queries.

standard_sql

API documentation forbigquery.standard_sql module.

table

Define API Tables.

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.