FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update table_insert_rows.py by jmgreger · Pull Request #253 · googleapis/python-bigquery · GitHub

This repository was archived by the owner on Mar 6, 2026. It is now read-only.
/ python-bigquery Public archive

Update table_insert_rows.py - #253

Closed
jmgreger wants to merge 2 commits into
googleapis:masterfrom
jmgreger:patch-2
Closed

Update table_insert_rows.py#253
jmgreger wants to merge 2 commits into
googleapis:masterfrom
jmgreger:patch-2

Conversation

Copy link
Copy Markdown

Adding information to this example for more efficient streaming. Reduce calls to client.get_table()

This PR is meant to replace #212 due to issues from referencing a release initially. Comments and suggestions were incorporated into this PR.

Fixes #211 🦕

Adding information to this example for more efficient streaming. Reduce calls to client.get_table()
jmgreger requested review from a team and shollyman as code owners August 31, 2020 16:54
google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 31, 2020
jmgreger requested review from dinagraves and removed request for a team August 31, 2020 16:54
product-auto-label Bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Sep 1, 2020

plamut 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

On the surface the change seems sensible, although I cannot really comment on the wording in the comments, as I'm not a native English speaker.

Before merging, though, please make sure that the all the checks pass (linters, tests...), and that commit messages follow the conventional commits guideline, thanks!

if errors == []:
try:
# Stream data to BQ
client.insert_rows(table_id, selected_fields=schema, rows_to_insert)

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Positional arguments cannot follow keyword arguments, please change the call.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Also, still need to check for errors. The API call returns success on parial failure, such as unable to insert a particular row.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve guidance for streaming inserts

3 participants


Back | FazBrowse Home | New Git URL