Package com.google.cloud.bigquery
Class Model
- java.lang.Object
-
- com.google.cloud.bigquery.ModelInfo
-
- com.google.cloud.bigquery.Model
-
- All Implemented Interfaces:
Serializable
public class Model extends ModelInfo
A Google BigQuery ML Model.Objects of this class are immutable. Operations that modify the table like
update(com.google.cloud.bigquery.BigQuery.ModelOption...)return a new object. To get aModelobject with the most recent information usereload(com.google.cloud.bigquery.BigQuery.ModelOption...).- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModel.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandelete()Deletes this model.booleanequals(Object obj)booleanexists()Check if this model exists.BigQuerygetBigQuery()Return's the model'sBigQueryobject used to issue requests.inthashCode()Modelreload(BigQuery.ModelOption... options)Fetches current model's state from the service.Model.BuildertoBuilder()Modelupdate(BigQuery.ModelOption... options)Updates the model's information with this model's information.-
Methods inherited from class com.google.cloud.bigquery.ModelInfo
getCreationTime, getDescription, getEncryptionConfiguration, getEtag, getExpirationTime, getFeatureColumns, getFriendlyName, getLabelColumns, getLabels, getLastModifiedTime, getLocation, getModelId, getModelType, getTrainingRuns, newBuilder, of, toString
-
-
-
-
Method Detail
-
exists
public boolean exists()
Check if this model exists.- Returns:
trueif this table exists,falseotherwise- Throws:
BigQueryException- upon failure
-
reload
public Model reload(BigQuery.ModelOption... options)
Fetches current model's state from the service. Returnsnullif the model does not exist. A newModelis returned.- Parameters:
options- model options- Returns:
- a
Modelobject with latest information ornullif not found - Throws:
BigQueryException- upon failure
-
update
public Model update(BigQuery.ModelOption... options)
Updates the model's information with this model's information. Dataset and model identifiers cannot be updated. A newModelobject is returned.- Parameters:
options- dataset options- Returns:
- a
Modelobject with updated information - Throws:
BigQueryException- upon failure
-
delete
public boolean delete()
Deletes this model.- Returns:
trueif model was deleted,falseif it was not found- Throws:
BigQueryException- upon failure
-
getBigQuery
public BigQuery getBigQuery()
Return's the model'sBigQueryobject used to issue requests. *
-
toBuilder
public Model.Builder toBuilder()
-
-