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
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.
Construct the API resource representation of this model reference.
Attributes
ID of dataset containing the model.
The model ID.
URL path for the model’s APIs.
Project bound to the model
- classmethod from_api_repr(resource: Dict[str, Any]) → google.cloud.bigquery.model.ModelReference[source]¶
Factory: construct a model reference given its API representation.
- Parameters
resource – Model reference representation returned from the API
- Returns
Model reference parsed from
resource
.
- classmethod from_string(model_id: str, default_project: Optional[str] = None) → google.cloud.bigquery.model.ModelReference[source]¶
Construct a model reference from model ID string.
- Parameters
model_id – 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 – The project ID to use when
model_id
does not include a project ID.
- Returns
Model reference parsed from
model_id
.- Raises
ValueError – If
model_id
is not a fully-qualified table ID in standard SQL format.
- property path: str¶
URL path for the model’s APIs.