Skip to content

docs(bigquery): add sample for restoring multiple deleted tables - #14642

Open
alihanoz-google wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
alihanoz-google:add_restore_multiple_tables_sample
Open

alihanoz-google wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
alihanoz-google:add_restore_multiple_tables_sample

Conversation

@alihanoz-google

Copy link
Copy Markdown

Description

This PR adds a Python sample script demonstrating how to programmatically find and restore multiple deleted BigQuery tables concurrently using INFORMATION_SCHEMA.TABLE_STORAGE, time travel decorators, and ThreadPoolExecutor.

Fixes #14641

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

@alihanoz-google
alihanoz-google requested review from a team and chalmerlowe as code owners October 13, 2026 15:47
@snippet-bot

snippet-bot Bot commented Oct 13, 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 Oct 13, 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 restore_multiple_tables.py to restore multiple deleted BigQuery tables concurrently using time travel. A security issue was identified regarding potential SQL injection when interpolating dataset_id into the query string, and it is recommended to use parameterized queries instead.

Comment thread bigquery/cloud-client/restore_multiple_tables.py
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.

Add Python sample for restoring multiple deleted BigQuery tables concurrently

1 participant