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.

Types for Google Cloud Bigquery v2 API

class google.cloud.bigquery_v2.types.DeleteModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

project_id

Required. Project ID of the model to delete.

Type

str

dataset_id

Required. Dataset ID of the model to delete.

Type

str

model_id

Required. Model ID of the model to delete.

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.EncryptionConfiguration(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

kms_key_name

Optional. Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.

Type

google.protobuf.wrappers_pb2.StringValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.GetModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

project_id

Required. Project ID of the requested model.

Type

str

dataset_id

Required. Dataset ID of the requested model.

Type

str

model_id

Required. Model ID of the requested model.

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.ListModelsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

project_id

Required. Project ID of the models to list.

Type

str

dataset_id

Required. Dataset ID of the models to list.

Type

str

max_results

The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.

Type

google.protobuf.wrappers_pb2.UInt32Value

page_token

Page token, returned by a previous call to request the next page of results

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.ListModelsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

models

Models in the requested dataset. Only the following fields are populated: model_reference, model_type, creation_time, last_modified_time and labels.

Type

Sequence[google.cloud.bigquery_v2.types.Model]

next_page_token

A token to request the next page of results.

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

property raw_page
class google.cloud.bigquery_v2.types.Model(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

etag

Output only. A hash of this resource.

Type

str

model_reference

Required. Unique identifier for this model.

Type

google.cloud.bigquery_v2.types.ModelReference

creation_time

Output only. The time when this model was created, in millisecs since the epoch.

Type

int

last_modified_time

Output only. The time when this model was last modified, in millisecs since the epoch.

Type

int

description

Optional. A user-friendly description of this model.

Type

str

friendly_name

Optional. A descriptive name for this model.

Type

str

labels

The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.

Type

Sequence[google.cloud.bigquery_v2.types.Model.LabelsEntry]

expiration_time

Optional. The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models.

Type

int

location

Output only. The geographic location where the model resides. This value is inherited from the dataset.

Type

str

encryption_configuration

Custom encryption configuration (e.g., Cloud KMS keys). This shows the encryption configuration of the model data while stored in BigQuery storage. This field can be used with PatchModel to update encryption key for an already encrypted model.

Type

google.cloud.bigquery_v2.types.EncryptionConfiguration

model_type

Output only. Type of the model resource.

Type

google.cloud.bigquery_v2.types.Model.ModelType

training_runs

Output only. Information for all training runs in increasing order of start_time.

Type

Sequence[google.cloud.bigquery_v2.types.Model.TrainingRun]

feature_columns

Output only. Input feature columns that were used to train this model.

Type

Sequence[google.cloud.bigquery_v2.types.StandardSqlField]

label_columns

Output only. Label columns that were used to train this model. The output of the model will have a predicted_ prefix to these columns.

Type

Sequence[google.cloud.bigquery_v2.types.StandardSqlField]

best_trial_id

The best trial_id across all training runs.

Type

int

class AggregateClassificationMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows.

precision

Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.

Type

google.protobuf.wrappers_pb2.DoubleValue

recall

Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.

Type

google.protobuf.wrappers_pb2.DoubleValue

accuracy

Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.

Type

google.protobuf.wrappers_pb2.DoubleValue

threshold

Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.

Type

google.protobuf.wrappers_pb2.DoubleValue

f1_score

The F1 score is an average of recall and precision. For multiclass this is a macro- averaged metric.

Type

google.protobuf.wrappers_pb2.DoubleValue

log_loss

Logarithmic Loss. For multiclass this is a macro-averaged metric.

Type

google.protobuf.wrappers_pb2.DoubleValue

roc_auc

Area Under a ROC Curve. For multiclass this is a macro-averaged metric.

Type

google.protobuf.wrappers_pb2.DoubleValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ArimaFittingMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

ARIMA model fitting metrics.

log_likelihood

Log-likelihood.

Type

float

aic

AIC.

Type

float

variance

Variance.

Type

float

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ArimaForecastingMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Model evaluation metrics for ARIMA forecasting models.

non_seasonal_order

Non-seasonal order.

Type

Sequence[google.cloud.bigquery_v2.types.Model.ArimaOrder]

arima_fitting_metrics

Arima model fitting metrics.

Type

Sequence[google.cloud.bigquery_v2.types.Model.ArimaFittingMetrics]

seasonal_periods

Seasonal periods. Repeated because multiple periods are supported for one time series.

Type

Sequence[google.cloud.bigquery_v2.types.Model.SeasonalPeriod.SeasonalPeriodType]

has_drift

Whether Arima model fitted with drift or not. It is always false when d is not 1.

Type

Sequence[bool]

time_series_id

Id to differentiate different time series for the large-scale case.

Type

Sequence[str]

arima_single_model_forecasting_metrics

Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.

Type

Sequence[google.cloud.bigquery_v2.types.Model.ArimaForecastingMetrics.ArimaSingleModelForecastingMetrics]

class ArimaSingleModelForecastingMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Model evaluation metrics for a single ARIMA forecasting model.

non_seasonal_order

Non-seasonal order.

Type

google.cloud.bigquery_v2.types.Model.ArimaOrder

arima_fitting_metrics

Arima fitting metrics.

Type

google.cloud.bigquery_v2.types.Model.ArimaFittingMetrics

has_drift

Is arima model fitted with drift or not. It is always false when d is not 1.

Type

bool

time_series_id

The time_series_id value for this time series. It will be one of the unique values from the time_series_id_column specified during ARIMA model training. Only present when time_series_id_column training option was used.

Type

str

time_series_ids

The tuple of time_series_ids identifying this time series. It will be one of the unique tuples of values present in the time_series_id_columns specified during ARIMA model training. Only present when time_series_id_columns training option was used and the order of values here are same as the order of time_series_id_columns.

Type

Sequence[str]

seasonal_periods

Seasonal periods. Repeated because multiple periods are supported for one time series.

Type

Sequence[google.cloud.bigquery_v2.types.Model.SeasonalPeriod.SeasonalPeriodType]

has_holiday_effect

If true, holiday_effect is a part of time series decomposition result.

Type

google.protobuf.wrappers_pb2.BoolValue

has_spikes_and_dips

If true, spikes_and_dips is a part of time series decomposition result.

Type

google.protobuf.wrappers_pb2.BoolValue

has_step_changes

If true, step_changes is a part of time series decomposition result.

Type

google.protobuf.wrappers_pb2.BoolValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ArimaOrder(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

p

Order of the autoregressive part.

Type

int

d

Order of the differencing part.

Type

int

q

Order of the moving-average part.

Type

int

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class BinaryClassificationMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Evaluation metrics for binary classification/classifier models.

aggregate_classification_metrics

Aggregate classification metrics.

Type

google.cloud.bigquery_v2.types.Model.AggregateClassificationMetrics

binary_confusion_matrix_list

Binary confusion matrix at multiple thresholds.

Type

Sequence[google.cloud.bigquery_v2.types.Model.BinaryClassificationMetrics.BinaryConfusionMatrix]

positive_label

Label representing the positive class.

Type

str

negative_label

Label representing the negative class.

Type

str

class BinaryConfusionMatrix(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Confusion matrix for binary classification models.

positive_class_threshold

Threshold value used when computing each of the following metric.

Type

google.protobuf.wrappers_pb2.DoubleValue

true_positives

Number of true samples predicted as true.

Type

google.protobuf.wrappers_pb2.Int64Value

false_positives

Number of false samples predicted as true.

Type

google.protobuf.wrappers_pb2.Int64Value

true_negatives

Number of true samples predicted as false.

Type

google.protobuf.wrappers_pb2.Int64Value

false_negatives

Number of false samples predicted as false.

Type

google.protobuf.wrappers_pb2.Int64Value

precision

The fraction of actual positive predictions that had positive actual labels.

Type

google.protobuf.wrappers_pb2.DoubleValue

recall

The fraction of actual positive labels that were given a positive prediction.

Type

google.protobuf.wrappers_pb2.DoubleValue

f1_score

The equally weighted average of recall and precision.

Type

google.protobuf.wrappers_pb2.DoubleValue

accuracy

The fraction of predictions given the correct label.

Type

google.protobuf.wrappers_pb2.DoubleValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ClusteringMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Evaluation metrics for clustering models.

davies_bouldin_index

Davies-Bouldin index.

Type

google.protobuf.wrappers_pb2.DoubleValue

mean_squared_distance

Mean of squared distances between each sample to its cluster centroid.

Type

google.protobuf.wrappers_pb2.DoubleValue

clusters

Information for all clusters.

Type

Sequence[google.cloud.bigquery_v2.types.Model.ClusteringMetrics.Cluster]

class Cluster(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message containing the information about one cluster.

centroid_id

Centroid id.

Type

int

feature_values

Values of highly variant features for this cluster.

Type

Sequence[google.cloud.bigquery_v2.types.Model.ClusteringMetrics.Cluster.FeatureValue]

count

Count of training data rows that were assigned to this cluster.

Type

google.protobuf.wrappers_pb2.Int64Value

class FeatureValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Representative value of a single feature within the cluster.

feature_column

The feature column name.

Type

str

numerical_value

The numerical feature value. This is the centroid value for this feature.

Type

google.protobuf.wrappers_pb2.DoubleValue

categorical_value

The categorical feature value.

Type

google.cloud.bigquery_v2.types.Model.ClusteringMetrics.Cluster.FeatureValue.CategoricalValue

class CategoricalValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Representative value of a categorical feature.

category_counts

Counts of all categories for the categorical feature. If there are more than ten categories, we return top ten (by count) and return one more CategoryCount with category “OTHER” and count as aggregate counts of remaining categories.

Type

Sequence[google.cloud.bigquery_v2.types.Model.ClusteringMetrics.Cluster.FeatureValue.CategoricalValue.CategoryCount]

class CategoryCount(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the count of a single category within the cluster.

category

The name of category.

Type

str

count

The count of training samples matching the category within the cluster.

Type

google.protobuf.wrappers_pb2.Int64Value

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class DataFrequency(value)[source]

Bases: proto.enums.Enum

Type of supported data frequency for time series forecasting models.

AUTO_FREQUENCY = 1
DAILY = 6
DATA_FREQUENCY_UNSPECIFIED = 0
HOURLY = 7
MONTHLY = 4
PER_MINUTE = 8
QUARTERLY = 3
WEEKLY = 5
YEARLY = 2
class DataSplitMethod(value)[source]

Bases: proto.enums.Enum

Indicates the method to split input data into multiple tables.

AUTO_SPLIT = 5
CUSTOM = 2
DATA_SPLIT_METHOD_UNSPECIFIED = 0
NO_SPLIT = 4
RANDOM = 1
SEQUENTIAL = 3
class DataSplitResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

training_table

Table reference of the training data after split.

Type

google.cloud.bigquery_v2.types.TableReference

evaluation_table

Table reference of the evaluation data after split.

Type

google.cloud.bigquery_v2.types.TableReference

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class DistanceType(value)[source]

Bases: proto.enums.Enum

Distance metric used to compute the distance between two points.

COSINE = 2
DISTANCE_TYPE_UNSPECIFIED = 0
EUCLIDEAN = 1
class EvaluationMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

regression_metrics

Populated for regression models and explicit feedback type matrix factorization models.

Type

google.cloud.bigquery_v2.types.Model.RegressionMetrics

binary_classification_metrics

Populated for binary classification/classifier models.

Type

google.cloud.bigquery_v2.types.Model.BinaryClassificationMetrics

multi_class_classification_metrics

Populated for multi-class classification/classifier models.

Type

google.cloud.bigquery_v2.types.Model.MultiClassClassificationMetrics

clustering_metrics

Populated for clustering models.

Type

google.cloud.bigquery_v2.types.Model.ClusteringMetrics

ranking_metrics

Populated for implicit feedback type matrix factorization models.

Type

google.cloud.bigquery_v2.types.Model.RankingMetrics

arima_forecasting_metrics

Populated for ARIMA models.

Type

google.cloud.bigquery_v2.types.Model.ArimaForecastingMetrics

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class FeedbackType(value)[source]

Bases: proto.enums.Enum

Indicates the training algorithm to use for matrix factorization models.

EXPLICIT = 2
FEEDBACK_TYPE_UNSPECIFIED = 0
IMPLICIT = 1
class GlobalExplanation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Global explanations containing the top most important features after training.

explanations

A list of the top global explanations. Sorted by absolute value of attribution in descending order.

Type

Sequence[google.cloud.bigquery_v2.types.Model.GlobalExplanation.Explanation]

class_label

Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.

Type

str

class Explanation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Explanation for a single feature.

feature_name

Full name of the feature. For non-numerical features, will be formatted like <column_name>.<encoded_feature_name>. Overall size of feature name will always be truncated to first 120 characters.

Type

str

attribution

Attribution of feature.

Type

google.protobuf.wrappers_pb2.DoubleValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class HolidayRegion(value)[source]

Bases: proto.enums.Enum

Type of supported holiday regions for time series forecasting models.

AE = 6
AR = 7
AT = 8
AU = 9
BE = 10
BR = 11
CA = 12
CH = 13
CL = 14
CN = 15
CO = 16
CS = 17
CZ = 18
DE = 19
DK = 20
DZ = 21
EC = 22
EE = 23
EG = 24
EMEA = 4
ES = 25
FI = 26
FR = 27
GB = 28
GLOBAL = 1
GR = 29
HK = 30
HOLIDAY_REGION_UNSPECIFIED = 0
HU = 31
ID = 32
IE = 33
IL = 34
IN = 35
IR = 36
IT = 37
JAPAC = 3
JP = 38
KR = 39
LAC = 5
LV = 40
MA = 41
MX = 42
MY = 43
NA = 2
NG = 44
NL = 45
NO = 46
NZ = 47
PE = 48
PH = 49
PK = 50
PL = 51
PT = 52
RO = 53
RS = 54
RU = 55
SA = 56
SE = 57
SG = 58
SI = 59
SK = 60
TH = 61
TR = 62
TW = 63
UA = 64
US = 65
VE = 66
VN = 67
ZA = 68
class KmeansEnums(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

class KmeansInitializationMethod(value)[source]

Bases: proto.enums.Enum

Indicates the method used to initialize the centroids for KMeans clustering algorithm.

CUSTOM = 2
KMEANS_INITIALIZATION_METHOD_UNSPECIFIED = 0
KMEANS_PLUS_PLUS = 3
RANDOM = 1
__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class LearnRateStrategy(value)[source]

Bases: proto.enums.Enum

Indicates the learning rate optimization strategy to use.

CONSTANT = 2
LEARN_RATE_STRATEGY_UNSPECIFIED = 0
class LossType(value)[source]

Bases: proto.enums.Enum

Loss metric to evaluate model training performance.

LOSS_TYPE_UNSPECIFIED = 0
MEAN_LOG_LOSS = 2
MEAN_SQUARED_LOSS = 1
class ModelType(value)[source]

Bases: proto.enums.Enum

Indicates the type of the Model.

ARIMA = 11
ARIMA_PLUS = 19
AUTOML_CLASSIFIER = 13
AUTOML_REGRESSOR = 12
BOOSTED_TREE_CLASSIFIER = 10
BOOSTED_TREE_REGRESSOR = 9
DNN_CLASSIFIER = 5
DNN_REGRESSOR = 7
KMEANS = 3
LINEAR_REGRESSION = 1
LOGISTIC_REGRESSION = 2
MATRIX_FACTORIZATION = 4
MODEL_TYPE_UNSPECIFIED = 0
TENSORFLOW = 6
class MultiClassClassificationMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Evaluation metrics for multi-class classification/classifier models.

aggregate_classification_metrics

Aggregate classification metrics.

Type

google.cloud.bigquery_v2.types.Model.AggregateClassificationMetrics

confusion_matrix_list

Confusion matrix at different thresholds.

Type

Sequence[google.cloud.bigquery_v2.types.Model.MultiClassClassificationMetrics.ConfusionMatrix]

class ConfusionMatrix(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Confusion matrix for multi-class classification models.

confidence_threshold

Confidence threshold used when computing the entries of the confusion matrix.

Type

google.protobuf.wrappers_pb2.DoubleValue

rows

One row per actual label.

Type

Sequence[google.cloud.bigquery_v2.types.Model.MultiClassClassificationMetrics.ConfusionMatrix.Row]

class Entry(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A single entry in the confusion matrix.

predicted_label

The predicted label. For confidence_threshold > 0, we will also add an entry indicating the number of items under the confidence threshold.

Type

str

item_count

Number of items being predicted as this label.

Type

google.protobuf.wrappers_pb2.Int64Value

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class Row(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A single row in the confusion matrix.

actual_label

The original label of this row.

Type

str

entries

Info describing predicted label distribution.

Type

Sequence[google.cloud.bigquery_v2.types.Model.MultiClassClassificationMetrics.ConfusionMatrix.Entry]

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class OptimizationStrategy(value)[source]

Bases: proto.enums.Enum

Indicates the optimization strategy used for training.

BATCH_GRADIENT_DESCENT = 1
NORMAL_EQUATION = 2
OPTIMIZATION_STRATEGY_UNSPECIFIED = 0
class RankingMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

mean_average_precision

Calculates a precision per user for all the items by ranking them and then averages all the precisions across all the users.

Type

google.protobuf.wrappers_pb2.DoubleValue

mean_squared_error

Similar to the mean squared error computed in regression and explicit recommendation models except instead of computing the rating directly, the output from evaluate is computed against a preference which is 1 or 0 depending on if the rating exists or not.

Type

google.protobuf.wrappers_pb2.DoubleValue

normalized_discounted_cumulative_gain

A metric to determine the goodness of a ranking calculated from the predicted confidence by comparing it to an ideal rank measured by the original ratings.

Type

google.protobuf.wrappers_pb2.DoubleValue

average_rank

Determines the goodness of a ranking by computing the percentile rank from the predicted confidence and dividing it by the original rank.

Type

google.protobuf.wrappers_pb2.DoubleValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class RegressionMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Evaluation metrics for regression and explicit feedback type matrix factorization models.

mean_absolute_error

Mean absolute error.

Type

google.protobuf.wrappers_pb2.DoubleValue

mean_squared_error

Mean squared error.

Type

google.protobuf.wrappers_pb2.DoubleValue

mean_squared_log_error

Mean squared log error.

Type

google.protobuf.wrappers_pb2.DoubleValue

median_absolute_error

Median absolute error.

Type

google.protobuf.wrappers_pb2.DoubleValue

r_squared

R^2 score. This corresponds to r2_score in ML.EVALUATE.

Type

google.protobuf.wrappers_pb2.DoubleValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class SeasonalPeriod(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

class SeasonalPeriodType(value)[source]

Bases: proto.enums.Enum

DAILY = 2
MONTHLY = 4
NO_SEASONALITY = 1
QUARTERLY = 5
SEASONAL_PERIOD_TYPE_UNSPECIFIED = 0
WEEKLY = 3
YEARLY = 6
__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class TrainingRun(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information about a single training query run for the model.

training_options

Options that were used for this training run, includes user specified and default options that were used.

Type

google.cloud.bigquery_v2.types.Model.TrainingRun.TrainingOptions

start_time

The start time of this training run.

Type

google.protobuf.timestamp_pb2.Timestamp

results

Output of each iteration run, results.size() <= max_iterations.

Type

Sequence[google.cloud.bigquery_v2.types.Model.TrainingRun.IterationResult]

evaluation_metrics

The evaluation metrics over training/eval data that were computed at the end of training.

Type

google.cloud.bigquery_v2.types.Model.EvaluationMetrics

data_split_result

Data split result of the training run. Only set when the input data is actually split.

Type

google.cloud.bigquery_v2.types.Model.DataSplitResult

global_explanations

Global explanations for important features of the model. For multi-class models, there is one entry for each label class. For other models, there is only one entry in the list.

Type

Sequence[google.cloud.bigquery_v2.types.Model.GlobalExplanation]

class IterationResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information about a single iteration of the training run.

index

Index of the iteration, 0 based.

Type

google.protobuf.wrappers_pb2.Int32Value

duration_ms

Time taken to run the iteration in milliseconds.

Type

google.protobuf.wrappers_pb2.Int64Value

training_loss

Loss computed on the training data at the end of iteration.

Type

google.protobuf.wrappers_pb2.DoubleValue

eval_loss

Loss computed on the eval data at the end of iteration.

Type

google.protobuf.wrappers_pb2.DoubleValue

learn_rate

Learn rate used for this iteration.

Type

float

cluster_infos

Information about top clusters for clustering models.

Type

Sequence[google.cloud.bigquery_v2.types.Model.TrainingRun.IterationResult.ClusterInfo]

arima_result
Type

google.cloud.bigquery_v2.types.Model.TrainingRun.IterationResult.ArimaResult

class ArimaResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

(Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.

arima_model_info

This message is repeated because there are multiple arima models fitted in auto-arima. For non-auto-arima model, its size is one.

Type

Sequence[google.cloud.bigquery_v2.types.Model.TrainingRun.IterationResult.ArimaResult.ArimaModelInfo]

seasonal_periods

Seasonal periods. Repeated because multiple periods are supported for one time series.

Type

Sequence[google.cloud.bigquery_v2.types.Model.SeasonalPeriod.SeasonalPeriodType]

class ArimaCoefficients(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Arima coefficients.

auto_regressive_coefficients

Auto-regressive coefficients, an array of double.

Type

Sequence[float]

moving_average_coefficients

Moving-average coefficients, an array of double.

Type

Sequence[float]

intercept_coefficient

Intercept coefficient, just a double not an array.

Type

float

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ArimaModelInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Arima model information.

non_seasonal_order

Non-seasonal order.

Type

google.cloud.bigquery_v2.types.Model.ArimaOrder

arima_coefficients

Arima coefficients.

Type

google.cloud.bigquery_v2.types.Model.TrainingRun.IterationResult.ArimaResult.ArimaCoefficients

arima_fitting_metrics

Arima fitting metrics.

Type

google.cloud.bigquery_v2.types.Model.ArimaFittingMetrics

has_drift

Whether Arima model fitted with drift or not. It is always false when d is not 1.

Type

bool

time_series_id

The time_series_id value for this time series. It will be one of the unique values from the time_series_id_column specified during ARIMA model training. Only present when time_series_id_column training option was used.

Type

str

time_series_ids

The tuple of time_series_ids identifying this time series. It will be one of the unique tuples of values present in the time_series_id_columns specified during ARIMA model training. Only present when time_series_id_columns training option was used and the order of values here are same as the order of time_series_id_columns.

Type

Sequence[str]

seasonal_periods

Seasonal periods. Repeated because multiple periods are supported for one time series.

Type

Sequence[google.cloud.bigquery_v2.types.Model.SeasonalPeriod.SeasonalPeriodType]

has_holiday_effect

If true, holiday_effect is a part of time series decomposition result.

Type

google.protobuf.wrappers_pb2.BoolValue

has_spikes_and_dips

If true, spikes_and_dips is a part of time series decomposition result.

Type

google.protobuf.wrappers_pb2.BoolValue

has_step_changes

If true, step_changes is a part of time series decomposition result.

Type

google.protobuf.wrappers_pb2.BoolValue

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class ClusterInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information about a single cluster for clustering model.

centroid_id

Centroid id.

Type

int

cluster_radius

Cluster radius, the average distance from centroid to each point assigned to the cluster.

Type

google.protobuf.wrappers_pb2.DoubleValue

cluster_size

Cluster size, the total number of points assigned to the cluster.

Type

google.protobuf.wrappers_pb2.Int64Value

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class TrainingOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Options used in model training.

max_iterations

The maximum number of iterations in training. Used only for iterative training algorithms.

Type

int

loss_type

Type of loss function used during training run.

Type

google.cloud.bigquery_v2.types.Model.LossType

learn_rate

Learning rate in training. Used only for iterative training algorithms.

Type

float

l1_regularization

L1 regularization coefficient.

Type

google.protobuf.wrappers_pb2.DoubleValue

l2_regularization

L2 regularization coefficient.

Type

google.protobuf.wrappers_pb2.DoubleValue

min_relative_progress

When early_stop is true, stops training when accuracy improvement is less than ‘min_relative_progress’. Used only for iterative training algorithms.

Type

google.protobuf.wrappers_pb2.DoubleValue

warm_start

Whether to train a model from the last checkpoint.

Type

google.protobuf.wrappers_pb2.BoolValue

early_stop

Whether to stop early when the loss doesn’t improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.

Type

google.protobuf.wrappers_pb2.BoolValue

input_label_columns

Name of input label columns in training data.

Type

Sequence[str]

data_split_method

The data split type for training and evaluation, e.g. RANDOM.

Type

google.cloud.bigquery_v2.types.Model.DataSplitMethod

data_split_eval_fraction

The fraction of evaluation data over the whole input data. The rest of data will be used as training data. The format should be double. Accurate to two decimal places. Default value is 0.2.

Type

float

data_split_column

The column to split data with. This column won’t be used as a feature.

  1. When data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true value tag are eval data, and the false are training data.

  2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are used as training data, and the rest are eval data. It respects the order in Orderable data types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties

Type

str

learn_rate_strategy

The strategy to determine learn rate for the current iteration.

Type

google.cloud.bigquery_v2.types.Model.LearnRateStrategy

initial_learn_rate

Specifies the initial learning rate for the line search learn rate strategy.

Type

float

label_class_weights

Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.

Type

Sequence[google.cloud.bigquery_v2.types.Model.TrainingRun.TrainingOptions.LabelClassWeightsEntry]

user_column

User column specified for matrix factorization models.

Type

str

item_column

Item column specified for matrix factorization models.

Type

str

distance_type

Distance type for clustering models.

Type

google.cloud.bigquery_v2.types.Model.DistanceType

num_clusters

Number of clusters for clustering models.

Type

int

model_uri

Google Cloud Storage URI from which the model was imported. Only applicable for imported models.

Type

str

optimization_strategy

Optimization strategy for training linear regression models.

Type

google.cloud.bigquery_v2.types.Model.OptimizationStrategy

hidden_units

Hidden units for dnn models.

Type

Sequence[int]

batch_size

Batch size for dnn models.

Type

int

dropout

Dropout probability for dnn models.

Type

google.protobuf.wrappers_pb2.DoubleValue

max_tree_depth

Maximum depth of a tree for boosted tree models.

Type

int

subsample

Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.

Type

float

min_split_loss

Minimum split loss for boosted tree models.

Type

google.protobuf.wrappers_pb2.DoubleValue

num_factors

Num factors specified for matrix factorization models.

Type

int

feedback_type

Feedback type that specifies which algorithm to run for matrix factorization.

Type

google.cloud.bigquery_v2.types.Model.FeedbackType

wals_alpha

Hyperparameter for matrix factoration when implicit feedback type is specified.

Type

google.protobuf.wrappers_pb2.DoubleValue

kmeans_initialization_method

The method used to initialize the centroids for kmeans algorithm.

Type

google.cloud.bigquery_v2.types.Model.KmeansEnums.KmeansInitializationMethod

kmeans_initialization_column

The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.

Type

str

time_series_timestamp_column

Column to be designated as time series timestamp for ARIMA model.

Type

str

time_series_data_column

Column to be designated as time series data for ARIMA model.

Type

str

auto_arima

Whether to enable auto ARIMA or not.

Type

bool

non_seasonal_order

A specification of the non-seasonal part of the ARIMA model: the three components (p, d, q) are the AR order, the degree of differencing, and the MA order.

Type

google.cloud.bigquery_v2.types.Model.ArimaOrder

data_frequency

The data frequency of a time series.

Type

google.cloud.bigquery_v2.types.Model.DataFrequency

include_drift

Include drift when fitting an ARIMA model.

Type

bool

holiday_region

The geographical region based on which the holidays are considered in time series modeling. If a valid value is specified, then holiday effects modeling is enabled.

Type

google.cloud.bigquery_v2.types.Model.HolidayRegion

time_series_id_column

The time series id column that was used during ARIMA model training.

Type

str

time_series_id_columns

The time series id columns that were used during ARIMA model training.

Type

Sequence[str]

horizon

The number of periods ahead that need to be forecasted.

Type

int

preserve_input_structs

Whether to preserve the input structs in output feature names. Suppose there is a struct A with field b. When false (default), the output feature name is A_b. When true, the output feature name is A.b.

Type

bool

auto_arima_max_order

The max value of non-seasonal p and q.

Type

int

decompose_time_series

If true, perform decompose time series and save the results.

Type

google.protobuf.wrappers_pb2.BoolValue

clean_spikes_and_dips

If true, clean spikes and dips in the input time series.

Type

google.protobuf.wrappers_pb2.BoolValue

adjust_step_changes

If true, detect step changes and make data adjustment in the input time series.

Type

google.protobuf.wrappers_pb2.BoolValue

class LabelClassWeightsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.ModelReference(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Id path of a model.

project_id

Required. The ID of the project containing this model.

Type

str

dataset_id

Required. The ID of the dataset containing this model.

Type

str

model_id

Required. The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.

Type

str

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.PatchModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

project_id

Required. Project ID of the model to patch.

Type

str

dataset_id

Required. Dataset ID of the model to patch.

Type

str

model_id

Required. Model ID of the model to patch.

Type

str

model

Required. Patched model. Follows RFC5789 patch semantics. Missing fields are not updated. To clear a field, explicitly set to default value.

Type

google.cloud.bigquery_v2.types.Model

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.StandardSqlDataType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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”}} ]}}

type_kind

Required. The top level type of this field. Can be any standard SQL data type (e.g., “INT64”, “DATE”, “ARRAY”).

Type

google.cloud.bigquery_v2.types.StandardSqlDataType.TypeKind

array_element_type

The type of the array’s elements, if type_kind = “ARRAY”.

Type

google.cloud.bigquery_v2.types.StandardSqlDataType

struct_type

The fields of this struct, in order, if type_kind = “STRUCT”.

Type

google.cloud.bigquery_v2.types.StandardSqlStructType

class TypeKind(value)[source]

Bases: proto.enums.Enum

ARRAY = 16
BIGNUMERIC = 24
BOOL = 5
BYTES = 9
DATE = 10
DATETIME = 21
FLOAT64 = 7
GEOGRAPHY = 22
INT64 = 2
INTERVAL = 26
JSON = 25
NUMERIC = 23
STRING = 8
STRUCT = 17
TIME = 20
TIMESTAMP = 19
TYPE_KIND_UNSPECIFIED = 0
__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.StandardSqlField(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A field or a column.

name

Optional. The name of this field. Can be absent for struct fields.

Type

str

type

Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this “type” field).

Type

google.cloud.bigquery_v2.types.StandardSqlDataType

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.StandardSqlStructType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

fields
Type

Sequence[google.cloud.bigquery_v2.types.StandardSqlField]

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.StandardSqlTableType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A table type

columns

The columns in this table type

Type

Sequence[google.cloud.bigquery_v2.types.StandardSqlField]

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.

class google.cloud.bigquery_v2.types.TableReference(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

project_id

Required. The ID of the project containing this table.

Type

str

dataset_id

Required. The ID of the dataset containing this table.

Type

str

table_id

Required. The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as sample_table$20190123.

Type

str

project_id_alternative

The alternative field that will be used when ESF is not able to translate the received data to the project_id field.

Type

Sequence[str]

dataset_id_alternative

The alternative field that will be used when ESF is not able to translate the received data to the project_id field.

Type

Sequence[str]

table_id_alternative

The alternative field that will be used when ESF is not able to translate the received data to the project_id field.

Type

Sequence[str]

__bool__()

Return True if any field is truthy, False otherwise.

__contains__(key)

Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accomodate cases not automatically covered.

Parameters

key (str) – The name of the field.

Returns

Whether the field’s value corresponds to a non-empty

wire serialization.

Return type

bool

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__(other)

Return True if the messages are equal, False otherwise.

__getattr__(key)

Retrieve the given field’s value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be “present”.

For primitives, a value of the correct type will always be returned (the “falsy” values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

Note

Some well-known protocol buffer types (e.g. google.protobuf.Timestamp) will be converted to their Python equivalents. See the marshal module for more details.

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.