Package com.google.cloud.bigquery
Class Model
java.lang.Object
com.google.cloud.bigquery.ModelInfo
com.google.cloud.bigquery.Model
- All Implemented Interfaces:
Serializable
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 a Model
object with the most recent information use reload(com.google.cloud.bigquery.BigQuery.ModelOption...)
.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
delete()
Deletes this model.final boolean
boolean
exists()
Check if this model exists.Return's the model'sBigQuery
object used to issue requests.final int
hashCode()
reload
(BigQuery.ModelOption... options) Fetches current model's state from the service.update
(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 Details
-
exists
public boolean exists()Check if this model exists.- Returns:
true
if this table exists,false
otherwise- Throws:
BigQueryException
- upon failure
-
reload
Fetches current model's state from the service. Returnsnull
if the model does not exist. A newModel
is returned.- Parameters:
options
- model options- Returns:
- a
Model
object with latest information ornull
if not found - Throws:
BigQueryException
- upon failure
-
update
Updates the model's information with this model's information. Dataset and model identifiers cannot be updated. A newModel
object is returned.- Parameters:
options
- dataset options- Returns:
- a
Model
object with updated information - Throws:
BigQueryException
- upon failure
-
delete
public boolean delete()Deletes this model.- Returns:
true
if model was deleted,false
if it was not found- Throws:
BigQueryException
- upon failure
-
getBigQuery
Return's the model'sBigQuery
object used to issue requests. * -
toBuilder
-
equals
-
hashCode
public final int hashCode()
-