Skip to content

feat: Adds dataset_view parameter to get_dataset method #2198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 2, 2025

Conversation

chalmerlowe
Copy link
Collaborator

This commit introduces a new dataset_view parameter to the get_dataset method in the BigQuery client. This allows you to specify the level of detail (METADATA, ACL, FULL) returned when fetching a dataset, based on permissions in the access control list (ACLs)

The DatasetView enum has been added to enums.py.

Unit tests have been added to verify:

  • Correct query parameter (view) formation for each enum value.
  • Correct behavior when dataset_view is None.
  • AttributeError is raised for invalid dataset_view types

This commit introduces a new `dataset_view` parameter to the `get_dataset`
method in the BigQuery client. This allows you to specify the level of
detail (METADATA, ACL, FULL) returned when fetching a dataset.

The `DatasetView` enum has been added to `enums.py`.

Unit tests have been added to verify:
- Correct query parameter (`view`) formation for each enum value.
- Correct behavior when `dataset_view` is None.
- AttributeError is raised for invalid `dataset_view` types.
@chalmerlowe chalmerlowe requested review from a team as code owners May 22, 2025 12:12
@chalmerlowe chalmerlowe requested a review from suzmue May 22, 2025 12:12
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery API. labels May 22, 2025
@Neenu1995 Neenu1995 removed their assignment May 22, 2025
shollyman
shollyman previously approved these changes May 30, 2025
@chalmerlowe chalmerlowe merged commit 28a5750 into main Jun 2, 2025
27 checks passed
@chalmerlowe chalmerlowe deleted the feat-dataset-view branch June 2, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants