Skip to content

docs(bigquery/bigframes): add table_insert_rows code sample - #14506

Closed
shuoweil wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
shuoweil:shuowei-bigframes-table-insert-rows
Closed

docs(bigquery/bigframes): add table_insert_rows code sample#14506
shuoweil wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
shuoweil:shuowei-bigframes-table-insert-rows

Conversation

@shuoweil

Copy link
Copy Markdown
Contributor

Description

Fixes b/546157676 (Subtask of b/522898394)

Adds a BigQuery DataFrames (bigframes) code sample for inserting/appending rows into a BigQuery table, targeting the high-traffic documentation page bigquery-table-insert-rows.

Summary of Changes

  • New Sample: Added bigquery/bigframes/table_insert_rows.py demonstrating how to append rows to a BigQuery table via df.to_gbq(table_id, if_exists="append").

@shuoweil
shuoweil requested review from a team and tswast as code owners August 13, 2026 21:11
@snippet-bot

snippet-bot Bot commented Aug 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 Aug 13, 2026
@shuoweil
shuoweil force-pushed the shuowei-bigframes-table-insert-rows branch from 32c948a to 022f565 Compare August 13, 2026 21:12

@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 sample script table_insert_rows.py for appending rows to a BigQuery table using BigQuery DataFrames, along with its corresponding test and a dynamic dataset fixture in conftest.py. The review feedback recommends utilizing the existing location fixture in conftest.py instead of hardcoding the location, and enhancing the test to verify that the data is successfully written to BigQuery by reading it back.

Comment thread bigquery/bigframes/conftest.py
Comment thread bigquery/bigframes/table_insert_rows_test.py Outdated
@shuoweil
shuoweil force-pushed the shuowei-bigframes-table-insert-rows branch from 8ed540c to 418dff5 Compare August 13, 2026 21:16
@shuoweil
shuoweil force-pushed the shuowei-bigframes-table-insert-rows branch from 418dff5 to 1f087d7 Compare August 13, 2026 21:17
@shuoweil

Copy link
Copy Markdown
Contributor Author

Will check in the code change in Git-on-Borg.

@shuoweil shuoweil closed this Aug 13, 2026
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.

1 participant