8000 feat: Add UpdateMode to update_dataset by chalmerlowe · Pull Request #2204 · googleapis/python-bigquery · GitHub
[go: up one dir, main page]

Skip to content

Conversation

chalmerlowe
Copy link
Collaborator

This commit introduces the UpdateMode enum and integrates it into the update_dataset method in the BigQuery client.

The UpdateMode enum allows you to specify which parts of a dataset should be updated (metadata, ACL, or full update).

The following changes were made:

  • Defined the UpdateMode enum in google/cloud/bigquery/enums.py with values: UPDATE_MODE_UNSPECIFIED, UPDATE_METADATA, UPDATE_ACL, and UPDATE_FULL.
  • Modified the update_dataset method in google/cloud/bigquery/client.py to accept an optional update_mode parameter. This parameter is added to the query parameters if provided.
  • Added unit tests in tests/unit/test_client.py to verify the correct handling of the update_mode parameter, including testing all enum values and the default case where it's not provided.

This commit introduces the `UpdateMode` enum and integrates it into the
`update_dataset` method in the BigQuery client.

The `UpdateMode` enum allows you to specify which parts of a dataset
should be updated (metadata, ACL, or full update).

The following changes were made:
- Defined the `UpdateMode` enum in `google/cloud/bigquery/enums.py`
  with values: `UPDATE_MODE_UNSPECIFIED`, `UPDATE_METADATA`,
  `UPDATE_ACL`, and `UPDATE_FULL`.
- Modified the `update_dataset` method in
  `google/cloud/bigquery/client.py` to accept an optional
  `update_mode` parameter. This parameter is added to the query
  parameters if provided.
- Added unit tests in `tests/unit/test_client.py` to verify the
  correct handling of the `update_mode` parameter, including
  testing all enum values and the default case where it's not
  provided.
@chalmerlowe chalmerlowe requested review from a team as code owners May 27, 2025 20:58
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label May 27, 2025
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label May 27, 2025
@chalmerlowe chalmerlowe merged commit eb9c2af into main May 30, 2025
27 checks passed
@chalmerlowe chalmerlowe deleted the feat-dataset-update-mode branch May 30, 2025 21:58
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
0