Skip to content

BigQuery: Use DatasetListItem for client.list_datasets - #4439

Merged
tswast merged 4 commits into
googleapis:masterfrom
tswast:bq-datasetref
Dec 6, 2017
Merged

BigQuery: Use DatasetListItem for client.list_datasets#4439
tswast merged 4 commits into
googleapis:masterfrom
tswast:bq-datasetref

Conversation

@tswast

Copy link
Copy Markdown
Contributor

Listing datasets only includes a subset of the properties available on a
dataset. The DatasetListItem class is used to explicitly document which
features are available and to prevent confusion from trying to use the
resulting object in other contexts, like updating.

Closes#4373.

@tswasttswast added the api: bigquery Issues related to the BigQuery API. label Nov 22, 2017
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 22, 2017
@tswast

Copy link
Copy Markdown
ContributorAuthor

Ping. Please review.

Listing datasets only includes a subset of the properties available on a
dataset. The DatasetListItem class is used to explicitly document which
features are available and to prevent confusion from trying to use the
resulting object in other contexts, like updating.
:rtype: str
:returns: the project.
"""
return self._properties.get('datasetReference').get('projectId')

This comment was marked as spam.

This comment was marked as spam.

:rtype: str
:returns: the dataset ID.
"""
return self._properties.get('datasetReference').get('datasetId')

This comment was marked as spam.

:rtype: dict, {str -> str}
:returns: A dict of the the dataset's labels.
"""
return self._properties['labels']

This comment was marked as spam.

This comment was marked as spam.

@tswast
tswast merged commit cc852af into googleapis:masterDec 6, 2017
@tswast
tswast deleted the bq-datasetref branch December 6, 2017 00:09
@tseavertseaver mentioned this pull request Jan 4, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigqueryIssues related to the BigQuery API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tswast@tseaver@googlebot