Skip to content

feat(bigquery): add bigquery_get_search_index_status sample to check … - #14728

Merged
iennae merged 1 commit into
mainfrom
feat/bq-get-search-index-status
Nov 3, 2026
Merged

iennae merged 1 commit into
mainfrom
feat/bq-get-search-index-status

Conversation

@iennae

@iennae iennae commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

…search index coverage and status

Problem:
The BigQuery documentation (https://cloud.google.com/bigquery/docs/search-index) needs a standalone, tested Python code sample demonstrating how to check search index coverage and status (region tag bigquery_get_search_index_status).

Solution:

  • Add get_search_index_status(project_id: str, dataset_id: str, table_id: str) -> None in bigquery/search/bigquery_get_search_index_status.py (Query INFORMATION_SCHEMA.SEARCH_INDEXES to inspect index status and coverage percentage in a BigQuery dataset.)
  • Add unit tests (bigquery/search/bigquery_get_search_index_status_test.py) covering both the success path and API error handling (GoogleAPICallError)

Description

Fixes #

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

@iennae
iennae requested review from a team and chalmerlowe as code owners November 2, 2026 23:17
@snippet-bot

snippet-bot Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label Bot added api: bigquery Issues related to the BigQuery API. samples Issues that are directly related to samples. labels Nov 2, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new script and tests to query and inspect BigQuery search index status. The feedback suggests updating the noxfile_config.py to ignore intermediate Python versions (3.11 and 3.12) instead of the oldest supported version (3.10). Additionally, it is recommended to print the queried coverage_percentage in the status output and update the corresponding unit tests to assert this new output.

Comment thread bigquery/search/noxfile_config.py Resolved
@iennae
iennae force-pushed the feat/bq-get-search-index-status branch from 039310e to 4e2e927 Compare November 2, 2026 23:33
…search index coverage and status

Problem:
The BigQuery documentation (https://cloud.google.com/bigquery/docs/search-index)
needs a standalone, tested Python code sample demonstrating how to
check search index coverage and status (region tag `bigquery_get_search_index_status`).

Solution:
- Add `get_search_index_status(project_id: str, dataset_id: str, table_id: str) -> None` in `bigquery/search/bigquery_get_search_index_status.py`
  (Query INFORMATION_SCHEMA.SEARCH_INDEXES to inspect index status and coverage percentage in a BigQuery dataset.)
- Add unit tests (`bigquery/search/bigquery_get_search_index_status_test.py`) covering both the success
  path and API error handling (`GoogleAPICallError`)
@iennae
iennae force-pushed the feat/bq-get-search-index-status branch from 4e2e927 to 5089568 Compare November 3, 2026 02:44

@XrossFox XrossFox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iennae
iennae merged commit ebedb49 into main Nov 3, 2026
13 of 21 checks passed
@iennae
iennae deleted the feat/bq-get-search-index-status branch November 3, 2026 18:32
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 BigQuery API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants