Repository navigation
feat(bigquery): add bigquery_create_manifest_biglake_table sample to … - #14721
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 corresponding unit tests for creating a BigLake external table backed by a newline-delimited manifest file. The feedback highlights two main issues: first, the SQL query uses 'CREATE OR REPLACE EXTERNAL TABLE', which renders the 'AlreadyExists' exception handling block dead code and conflicts with the unit tests; second, the 'noxfile_config.py' incorrectly ignores Python 3.10, which is the oldest supported version, rather than ignoring intermediate versions like 3.11 and 3.12.
|
|
||
| TEST_CONFIG_OVERRIDE = { | ||
| # You can opt out from the test for specific Python versions. | ||
| "ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11"], |
There was a problem hiding this comment.
According to the repository's general rules, we should only test the oldest and newest supported Python releases in test configurations, ignoring intermediate versions. Since requirements-test.txt specifies python_version >= "3.10", Python 3.10 is the oldest supported version and should not be ignored. Assuming Python 3.13 is the newest supported version, we should ignore intermediate versions like 3.11 and 3.12.
| "ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11"], | |
| "ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.11", "3.12"], |
References
- Only test the oldest and newest supported Python releases in test configurations (such as noxfile_config.py), ignoring intermediate versions.
XrossFox
left a comment
There was a problem hiding this comment.
Dependency versions in requirements file are outdated, but code looks good.
7c8cc72 to
bc84abe
Compare
…create a BigLake table backed by a Symfoni/Hive manifest file Problem: The BigQuery documentation (https://cloud.google.com/bigquery/docs/query-open-table-format-using-manifest-files) needs a standalone, tested Python code sample demonstrating how to create a BigLake table backed by a Symfoni/Hive manifest file (region tag `bigquery_create_manifest_biglake_table`). Solution: - Add `create_manifest_biglake_table(project_id: str, dataset_id: str, connection_id: str, manifest_uri: str) -> None` in `bigquery/biglake/bigquery_create_manifest_biglake_table.py` (Create a BigLake external table over open-table-format Parquet files using a manifest file URI and Cloud Resource connection.) - Add unit tests (`bigquery/biglake/bigquery_create_manifest_biglake_table_test.py`) covering both the success path and API error handling (`GoogleAPICallError`)
bc84abe to
e5278b2
Compare
…create a BigLake table backed by a Symfoni/Hive manifest file
Problem:
The BigQuery documentation (https://cloud.google.com/bigquery/docs/query-open-table-format-using-manifest-files) needs a standalone, tested Python code sample demonstrating how to create a BigLake table backed by a Symfoni/Hive manifest file (region tag
bigquery_create_manifest_biglake_table).Solution:
create_manifest_biglake_table(project_id: str, dataset_id: str, connection_id: str, manifest_uri: str) -> Noneinbigquery/biglake/bigquery_create_manifest_biglake_table.py(Create a BigLake external table over open-table-format Parquet files using a manifest file URI and Cloud Resource connection.)bigquery/biglake/bigquery_create_manifest_biglake_table_test.py) covering both the success path and API error handling (GoogleAPICallError)Checklist
Testing
Compliance & Style
Post-Approval Actions