Class Model (2.38.1)

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
TypeDescription
boolean

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

equals(Object obj)

public final boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

exists()

public boolean exists()

Check if this model exists.

Returns
TypeDescription
boolean

true if this table exists, false otherwise

getBigQuery()

public BigQuery getBigQuery()

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

Returns
TypeDescription
BigQuery

hashCode()

public final int hashCode()
Returns
TypeDescription
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
NameDescription
optionsModelOption[]

model options

Returns
TypeDescription
Model

a Model object with latest information or null if not found

toBuilder()

public Model.Builder toBuilder()
Returns
TypeDescription
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
NameDescription
optionsModelOption[]

dataset options

Returns
TypeDescription
Model

a Model object with updated information