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.routine.RoutineReference
-
class google.cloud.bigquery.routine.RoutineReference[source]
A pointer to a routine.
See:
https://cloud.google.com/bigquery/docs/reference/rest/v2/routines#routinereference
-
__init__()[source]
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__ ()
|
Initialize self. |
from_api_repr (resource)
|
Factory: construct a routine reference given its API representation. |
from_string (routine_id[, default_project])
|
Factory: construct a routine reference from routine ID string. |
to_api_repr ()
|
Construct the API resource representation of this routine reference. |
Attributes
dataset_id
|
ID of dataset containing the routine. |
path
|
URL path for the routine’s APIs. |
project
|
ID of the project containing the routine. |
routine_id
|
The routine ID. |
-
__eq__(other)[source]
Two RoutineReferences are equal if they point to the same routine.
-
__str__()[source]
String representation of the reference.
This is a fully-qualified ID, including the project ID and dataset ID.
-
property dataset_id
ID of dataset containing the routine.
- Type
str
-
classmethod from_api_repr(resource: dict) → google.cloud.bigquery.routine.routine.RoutineReference[source]
Factory: construct a routine reference given its API representation.
- Parameters
resource (Dict[str, object]) – Routine reference representation returned from the API.
- Returns
Routine reference parsed from resource
.
- Return type
google.cloud.bigquery.routine.RoutineReference
-
classmethod from_string(routine_id: str, default_project: Optional[str] = None) → google.cloud.bigquery.routine.routine.RoutineReference[source]
Factory: construct a routine reference from routine ID string.
- Parameters
routine_id (str) – A routine ID in standard SQL format. If default_project
is not specified, this must included a project ID, dataset
ID, and routine ID, each separated by .
.
default_project (Optional[str]) – The project ID to use when routine_id
does not
include a project ID.
- Returns
Routine reference parsed from routine_id
.
- Return type
google.cloud.bigquery.routine.RoutineReference
- Raises
ValueError – If routine_id
is not a fully-qualified routine ID in
standard SQL format.
-
property path
URL path for the routine’s APIs.
- Type
str
-
property project
ID of the project containing the routine.
- Type
str
-
property routine_id
The routine ID.
- Type
str
-
to_api_repr() → dict[source]
Construct the API resource representation of this routine reference.
- Returns
Routine reference represented as an API resource.
- Return type
Dict[str, object]