google.cloud.bigquery.dataset.DatasetReference#
Methods
|
Factory: construct a dataset reference given its API representation |
|
Construct a dataset reference from dataset ID string. |
|
Constructs a ModelReference. |
|
Constructs a RoutineReference. |
|
Constructs a TableReference. |
Construct the API resource representation of this dataset reference |
Attributes
Dataset ID. |
|
URL path for the dataset based on project and dataset ID. |
|
Project ID of the dataset. |
-
class
google.cloud.bigquery.dataset.
DatasetReference
(project, dataset_id)[source]# Bases:
object
DatasetReferences are pointers to datasets.
See https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets
- Parameters
- Raises
ValueError – If either argument is not of type
str
.
-
classmethod
from_api_repr
(resource)[source]# Factory: construct a dataset reference given its API representation
-
classmethod
from_string
(dataset_id, default_project=None)[source]# Construct a dataset reference from dataset ID string.
- Parameters
- Returns
Dataset reference parsed from
dataset_id
.- Return type
Examples
>>> DatasetReference.from_string('my-project-id.some_dataset') DatasetReference('my-project-id', 'some_dataset')
- Raises
ValueError – If
dataset_id
is not a fully-qualified dataset ID in standard SQL format.
-
model
(model_id)# Constructs a ModelReference.
- Parameters
model_id (str) – the ID of the model.
- Returns
A ModelReference for a model in this dataset.
- Return type
-
routine
(routine_id)# Constructs a RoutineReference.
- Parameters
routine_id (str) – the ID of the routine.
- Returns
A RoutineReference for a routine in this dataset.
- Return type