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.
google.cloud.bigquery.model.ModelReference
-
class
google.cloud.bigquery.model.
ModelReference
[source]
ModelReferences are pointers to models.
See
https://cloud.google.com/bigquery/docs/reference/rest/v2/models#modelreference
-
__init__
()[source]
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__ ()
|
Initialize self. |
from_api_repr (resource)
|
Factory: construct a model reference given its API representation |
from_string (model_id[, default_project])
|
Construct a model reference from model ID string. |
to_api_repr ()
|
Construct the API resource representation of this model reference. |
Attributes
-
property
dataset_id
ID of dataset containing the model.
- Type
str
-
classmethod
from_api_repr
(resource)[source]
Factory: construct a model reference given its API representation
- Parameters
resource (Dict[str, object]) – Model reference representation returned from the API
- Returns
Model reference parsed from resource
.
- Return type
google.cloud.bigquery.model.ModelReference
-
classmethod
from_string
(model_id, default_project=None)[source]
Construct a model reference from model ID string.
- Parameters
model_id (str) – A model ID in standard SQL format. If default_project
is not specified, this must included a project ID, dataset
ID, and model ID, each separated by .
.
default_project (Optional[str]) – The project ID to use when model_id
does not include
a project ID.
- Returns
Model reference parsed from model_id
.
- Return type
google.cloud.bigquery.model.ModelReference
- Raises
ValueError – If model_id
is not a fully-qualified table ID in
standard SQL format.
-
property
model_id
The model ID.
- Type
str
-
property
path
URL path for the model’s APIs.
- Type
str
-
property
project
Project bound to the model
- Type
str
-
to_api_repr
()[source]
Construct the API resource representation of this model reference.
- Returns
Model reference represented as an API resource
- Return type
Dict[str, object]