Repository navigation
feat(bigquery): add bigquery_drop_procedure sample to drop a SQL stor… - #14734
Conversation
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new Python sample and associated tests for dropping a BigQuery stored procedure. Feedback on the implementation includes correcting a misleading error message in the NotFound exception handler, as DROP PROCEDURE IF EXISTS will only raise this exception if the dataset or project is missing, not the procedure itself. Additionally, the test configuration in noxfile_config.py should be updated to ignore intermediate Python versions (3.11 and 3.12) to align with the policy of only testing the oldest and newest supported releases.
be11a3e to
993886a
Compare
XrossFox
left a comment
There was a problem hiding this comment.
LGTM, mock for failing test could swap where exception is raised to mock_client.result.
…ed procedure Problem: The BigQuery documentation (https://cloud.google.com/bigquery/docs/procedures) needs a standalone, tested Python code sample demonstrating how to drop a SQL stored procedure (region tag `bigquery_drop_procedure`). Solution: - Add `drop_procedure(project_id: str, dataset_id: str, procedure_id: str) -> None` in `bigquery/stored_procedures/bigquery_drop_procedure.py` (Delete an existing SQL stored procedure from a BigQuery dataset using DROP PROCEDURE IF EXISTS.) - Add unit tests (`bigquery/stored_procedures/bigquery_drop_procedure_test.py`) covering both the success path and API error handling (`GoogleAPICallError`)
993886a to
d67de8e
Compare
…ed procedure
Problem:
The BigQuery documentation (https://cloud.google.com/bigquery/docs/procedures) needs a standalone, tested Python code sample demonstrating how to drop a SQL stored procedure (region tag
bigquery_drop_procedure).Solution:
drop_procedure(project_id: str, dataset_id: str, procedure_id: str) -> Noneinbigquery/stored_procedures/bigquery_drop_procedure.py(Delete an existing SQL stored procedure from a BigQuery dataset using DROP PROCEDURE IF EXISTS.)bigquery/stored_procedures/bigquery_drop_procedure_test.py) covering both the success path and API error handling (GoogleAPICallError)Description
Fixes #
Checklist
Testing
Compliance & Style
Post-Approval Actions