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.

Enums for BigQuery API Client

class google.cloud.bigquery_v2.gapic.enums.Model[source]
class DataSplitMethod(value)[source]

Indicates the method to split input data into multiple tables.

DATA_SPLIT_METHOD_UNSPECIFIED
Type

int

RANDOM

Splits data randomly.

Type

int

CUSTOM

Splits data with the user provided tags.

Type

int

SEQUENTIAL

Splits data sequentially.

Type

int

NO_SPLIT

Data split will be skipped.

Type

int

AUTO_SPLIT

Splits data automatically: Uses NO_SPLIT if the data size is small.

Type

int

Otherwise uses RANDOM.
class DistanceType(value)[source]

Distance metric used to compute the distance between two points.

DISTANCE_TYPE_UNSPECIFIED
Type

int

EUCLIDEAN

Eculidean distance.

Type

int

COSINE

Cosine distance.

Type

int

class LearnRateStrategy(value)[source]

Indicates the learning rate optimization strategy to use.

LEARN_RATE_STRATEGY_UNSPECIFIED
Type

int

Use line search to determine learning rate.

Type

int

CONSTANT

Use a constant learning rate.

Type

int

class LossType(value)[source]

Loss metric to evaluate model training performance.

LOSS_TYPE_UNSPECIFIED
Type

int

MEAN_SQUARED_LOSS

Mean squared loss, used for linear regression.

Type

int

MEAN_LOG_LOSS

Mean log loss, used for logistic regression.

Type

int

class ModelType(value)[source]

Indicates the type of the Model.

MODEL_TYPE_UNSPECIFIED
Type

int

LINEAR_REGRESSION

Linear regression model.

Type

int

LOGISTIC_REGRESSION

Logistic regression based classification model.

Type

int

KMEANS

K-means clustering model.

Type

int

TENSORFLOW

[Beta] An imported TensorFlow model.

Type

int

class OptimizationStrategy(value)[source]

Indicates the optimization strategy used for training.

OPTIMIZATION_STRATEGY_UNSPECIFIED
Type

int

BATCH_GRADIENT_DESCENT

Uses an iterative batch gradient descent algorithm.

Type

int

NORMAL_EQUATION

Uses a normal equation to solve linear regression problem.

Type

int

class google.cloud.bigquery_v2.gapic.enums.StandardSqlDataType[source]
class TypeKind(value)[source]
TYPE_KIND_UNSPECIFIED

Invalid type.

Type

int

INT64

Encoded as a string in decimal format.

Type

int

BOOL

Encoded as a boolean “false” or “true”.

Type

int

FLOAT64

Encoded as a number, or string “NaN”, “Infinity” or “-Infinity”.

Type

int

STRING

Encoded as a string value.

Type

int

BYTES

Encoded as a base64 string per RFC 4648, section 4.

Type

int

TIMESTAMP

Encoded as an RFC 3339 timestamp with mandatory “Z” time zone string:

Type

int

1985-04-12T23

20:50.52Z

DATE

Encoded as RFC 3339 full-date format string: 1985-04-12

Type

int

TIME

Encoded as RFC 3339 partial-time format string: 23:20:50.52

Type

int

DATETIME

Encoded as RFC 3339 full-date “T” partial-time: 1985-04-12T23:20:50.52

Type

int

GEOGRAPHY

Encoded as WKT

Type

int

NUMERIC

Encoded as a decimal string.

Type

int

ARRAY

Encoded as a list with types matching Type.array_type.

Type

int

STRUCT

Encoded as a list with fields of type Type.struct_type[i]. List is

Type

int

used because a JSON object cannot have duplicate field names.