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.dataset.DatasetListItem

class google.cloud.bigquery.dataset.DatasetListItem(resource)[source]

A read-only dataset resource from a list operation.

For performance reasons, the BigQuery API only includes some of the dataset properties when listing datasets. Notably, access_entries is missing.

For a full list of the properties that the BigQuery API returns, see the REST documentation for datasets.list.

Parameters

resource (Dict[str, str]) – A dataset-like resource object from a dataset list response. A datasetReference property is required.

Raises

ValueError – If datasetReference or one of its required members is missing from resource.

__init__(resource)[source]

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

Methods

__init__(resource)

Initialize self.

model(model_id)

Constructs a ModelReference.

routine(routine_id)

Constructs a RoutineReference.

table(table_id)

Constructs a TableReference.

Attributes

dataset_id

Dataset ID.

friendly_name

Title of the dataset as set by the user (defaults to None).

full_dataset_id

ID for the dataset resource (None until set from the server)

labels

Labels for the dataset.

project

Project bound to the dataset.

reference

A reference to this dataset.

property dataset_id

Dataset ID.

Type

str

property friendly_name

Title of the dataset as set by the user (defaults to None).

Type

Union[str, None]

property full_dataset_id

ID for the dataset resource (None until set from the server)

In the format project_id:dataset_id.

Type

Union[str, None]

property labels

Labels for the dataset.

Type

Dict[str, str]

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

google.cloud.bigquery.model.ModelReference

property project

Project bound to the dataset.

Type

str

property reference

A reference to this dataset.

Type

google.cloud.bigquery.dataset.DatasetReference

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

google.cloud.bigquery.routine.RoutineReference

table(table_id)

Constructs a TableReference.

Parameters

table_id (str) – The ID of the table.

Returns

A table reference for a table in this dataset.

Return type

google.cloud.bigquery.table.TableReference