Skip to content

chore(bigtable): add bigtable samples#17240

Open
daniel-sanche wants to merge 5 commits into
mainfrom
bigtable_samples
Open

chore(bigtable): add bigtable samples#17240
daniel-sanche wants to merge 5 commits into
mainfrom
bigtable_samples

Conversation

@daniel-sanche
Copy link
Copy Markdown
Contributor

Adding back hand-written samples to python-bigtable

There is an argument that these samples should live in https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main, but I think it's best to keep the generated and hand-written samples together for now. And then we can revisit this again after splitting the admin and data surfaces. Let me know if you disagree

@daniel-sanche daniel-sanche requested a review from a team as a code owner May 22, 2026 20:26
@snippet-bot
Copy link
Copy Markdown

snippet-bot Bot commented May 22, 2026

Here is the summary of changes.

You are about to add 125 region tags.

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

Copy link
Copy Markdown
Contributor

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

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 comprehensive collection of Python samples for Google Cloud Bigtable, covering synchronous and asynchronous APIs, Apache Beam integration, HappyBase compatibility, and administrative operations. The review feedback highlights several critical improvements for the robustness of these samples, such as adding null checks for row lookups to prevent AttributeError or KeyError, and correcting the usage of await with async iterables. Other recommendations include adopting UTC timestamps for consistency, using more idiomatic Python for result counting, and implementing defensive checks for monitoring queries to handle empty results without raising exceptions.

Comment thread packages/google-cloud-bigtable/samples/hello/async_main.py
Comment thread packages/google-cloud-bigtable/samples/hello/async_main.py
Comment thread packages/google-cloud-bigtable/samples/hello/main.py
Comment thread packages/google-cloud-bigtable/samples/hello_happybase/main.py
Comment thread packages/google-cloud-bigtable/samples/quickstart/main.py
Comment thread packages/google-cloud-bigtable/samples/quickstart_happybase/main.py
Comment thread packages/google-cloud-bigtable/samples/beam/hello_world_write.py
Comment thread packages/google-cloud-bigtable/samples/metricscaler/metricscaler.py
Comment thread packages/google-cloud-bigtable/samples/metricscaler/metricscaler.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant