google.cloud.bigquery.dataset.DatasetReference¶
-
class
google.cloud.bigquery.dataset.
DatasetReference
(project, dataset_id)[source]¶ DatasetReferences are pointers to datasets.
See https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference
- Parameters
- Raises
ValueError – If either argument is not of type
str
.
-
__init__
(project, dataset_id)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(project, dataset_id)Initialize self.
from_api_repr
(resource)Factory: construct a dataset reference given its API representation
from_string
(dataset_id[, default_project])Construct a dataset reference from dataset ID string.
model
(model_id)Constructs a ModelReference.
routine
(routine_id)Constructs a RoutineReference.
table
(table_id)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.
-
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