Repository navigation
feat(bigquery): add bigquery_search_with_text_analyzer sample to sear… - #14738
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 BigQuery code sample, 'search_with_text_analyzer.py', demonstrating how to perform case-sensitive exact substring matching using the 'NO_OP_ANALYZER' in BigQuery's 'SEARCH' function. It also includes corresponding unit tests, dependency files, and a Nox configuration. The feedback recommends updating 'noxfile_config.py' to remove Python version '3.10' from the 'ignored_versions' list, ensuring that the oldest supported Python version is properly tested.
|
|
||
| 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 the oldest supported version is 3.10 (as specified in requirements-test.txt), please remove "3.10" from ignored_versions so that it is tested, while keeping "3.11" ignored as an intermediate version.
| "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"], |
References
- Only test the oldest and newest supported Python releases in test configurations (such as noxfile_config.py), ignoring intermediate versions.
31b1150 to
73e1ca5
Compare
…ch text using a specified text analyzer Problem: The BigQuery documentation (https://cloud.google.com/bigquery/docs/search) needs a standalone, tested Python code sample demonstrating how to search text using a specified text analyzer (region tag `bigquery_search_with_text_analyzer`). Solution: - Add `search_with_text_analyzer(project_id: str) -> None` in `bigquery/search/bigquery_search_with_text_analyzer.py` (Run a BigQuery SEARCH query specifying an explicit text analyzer such as LOG_ANALYZER, NO_OP_ANALYZER, or PATTERN_ANALYZER.) - Add unit tests (`bigquery/search/bigquery_search_with_text_analyzer_test.py`) covering both the success path and API error handling (`GoogleAPICallError`)
73e1ca5 to
9dcdf2e
Compare
…ch text using a specified text analyzer
Problem:
The BigQuery documentation (https://cloud.google.com/bigquery/docs/search) needs a standalone, tested Python code sample demonstrating how to search text using a specified text analyzer (region tag
bigquery_search_with_text_analyzer).Solution:
search_with_text_analyzer(project_id: str) -> Noneinbigquery/search/bigquery_search_with_text_analyzer.py(Run a BigQuery SEARCH query specifying an explicit text analyzer such as LOG_ANALYZER, NO_OP_ANALYZER, or PATTERN_ANALYZER.)bigquery/search/bigquery_search_with_text_analyzer_test.py) covering both the success path and API error handling (GoogleAPICallError)Description
Fixes #
Checklist
Testing
Compliance & Style
Post-Approval Actions