| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Please rebase to remove the release-related changes from this PR (the first three commits). Oops, my bad: the issue is that your PR targets the release-v1.27.0 branch, instead of master.
Sorry, something went wrong.
Ahh, sorry about that. I don't submit code very often :/. Should I make a new PR against master instead? |
Sorry, something went wrong.
|
I re-based this off of the master branch, now it just needs the files added by the chore bot to be removed. Doesn't look like I have rights to do that though. |
Sorry, something went wrong.
|
@jmgreger If you use git rebase -i in your local clone, you should be able to delete the bot-generated commits. E.g.: $ git checkout master
$ git fetch --all upstream # assuming this repo's remote is named 'upstream'.
$ git pull upstream/master
$ git checkout patch-1
$ git rebase -i master # delete first three commits and the last merge commit
$ git push -f origin patch-1As an alternative, you could just cherry-pick the patch from this commit into a new branch against current master, and then submit a new PR from that branch. |
Sorry, something went wrong.
| rows_to_insert = [(u"Phred Phlyntstone", 32), (u"Wylma Phlyntstone", 29)] #populate data for entry | ||
|
|
||
| try: | ||
| if 'schema' not in globals(): |
There was a problem hiding this comment.
Please keep the sample simple. This is unnecessary branching. If anything, we can call out that the schema can be fetched from a table in a comment.
Sorry, something went wrong.
| client.insert_rows(table_id, selected_fields=schema, rows_to_insert) # Stream data to BQ | ||
| print("New rows have been added.") | ||
| except ValueError: | ||
| print("Table’s schema is not set or rows is not a Sequence.") |
There was a problem hiding this comment.
No need to catch this ValueError. Just let the exception bubble up.
Sorry, something went wrong.
|
LGTM once Tim's comments are addressed and as long as tests pass |
Sorry, something went wrong.
Added in the use of selected_fields=schema to explicitly define the schema. This prevents excessive calling of table metadata when streaming large volumes of data. There may be a better way to showcase this in the code, but I wanted to put this out there for review.
…eapis#208) Co-authored-by: Tres Seaver <tseaver@palladion.com> Co-authored-by: Takashi Matsuo <tmatsuo@google.com>
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request. Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project). ℹ️ Googlers: Go here for more info. |
Sorry, something went wrong.
Co-authored-by: Tim Swast <swast@google.com>
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request. Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project). ℹ️ Googlers: Go here for more info. |
Sorry, something went wrong.
|
Closing this in favor of #253 as per comment in that PR. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Added in the use of selected_fields=schema to explicitly define the schema. This prevents excessive calling of table metadata when streaming large volumes of data.
There may be a better way to showcase this in the code, but I wanted to put this out there for review.
Fixes #211 🦕