Class Model (2.40.3)

public class Model extends ModelInfo

A Google BigQuery ML Model.

Objects of this class are immutable. Operations that modify the table like #update return a new object. To get a Model object with the most recent information use #reload.

Inheritance

Object > ModelInfo > Model

Methods

delete()

public boolean delete()

Deletes this model.

Returns
Type Description
boolean

true if model was deleted, false if it was not found

equals(Object obj)

public final boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

exists()

public boolean exists()

Check if this model exists.

Returns
Type Description
boolean

true if this table exists, false otherwise

getBigQuery()

public BigQuery getBigQuery()

Return's the model's BigQuery object used to issue requests. *

Returns
Type Description
BigQuery

hashCode()

public final int hashCode()
Returns
Type Description
int
Overrides

reload(BigQuery.ModelOption[] options)

public Model reload(BigQuery.ModelOption[] options)

Fetches current model's state from the service. Returns null if the model does not exist. A new Model is returned.

Parameter
Name Description
options ModelOption[]

model options

Returns
Type Description
Model

a Model object with latest information or null if not found

toBuilder()

public Model.Builder toBuilder()
Returns
Type Description
Model.Builder
Overrides

update(BigQuery.ModelOption[] options)

public Model update(BigQuery.ModelOption[] options)

Updates the model's information with this model's information. Dataset and model identifiers cannot be updated. A new Model object is returned.

Parameter
Name Description
options ModelOption[]

dataset options

Returns
Type Description
Model

a Model object with updated information