Class ModelReference (2.29.0)

ModelReference()

Inheritance

builtins.object > ModelReference

Properties

dataset_id

str: ID of dataset containing the model.

model_id

str: The model ID.

path

str: URL path for the model's APIs.

project

str: Project bound to the model

Methods

from_api_repr

from_api_repr(resource)

Factory: construct a model reference given its API representation

Parameter
Name Description
resource Dict[str, object]

Model reference representation returned from the API

Returns
Type Description
google.cloud.bigquery.model.ModelReference Model reference parsed from ``resource``.

from_string

from_string(model_id: str, default_project: Optional[str] = None)

Construct a model reference from model ID string.

Parameters
Name Description
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.

Exceptions
Type Description
ValueError If ``model_id`` is not a fully-qualified table ID in standard SQL format.
Returns
Type Description
google.cloud.bigquery.model.ModelReference Model reference parsed from ``model_id``.

to_api_repr

to_api_repr()

Construct the API resource representation of this model reference.

Returns
Type Description
Dict[str, object] Model reference represented as an API resource

__init__

__init__()

Initialize self. See help(type(self)) for accurate signature.

ModelReference

ModelReference()

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.