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

feat(bigquery): check rows arg type in insert_rows() by IlyaFaer · Pull Request #10174 · googleapis/google-cloud-python · GitHub

feat(bigquery): check rows arg type in insert_rows() - #10174

Merged
tswast merged 5 commits into
googleapis:masterfrom
MaxxleLLC:type_check_insert_rows
Jan 23, 2020
Merged

feat(bigquery): check rows arg type in insert_rows()#10174
tswast merged 5 commits into
googleapis:masterfrom
MaxxleLLC:type_check_insert_rows

Conversation

IlyaFaer commented Jan 20, 2020
edited
Loading

Copy link
Copy Markdown

Continuation of #10162
Adding arg type check into insert_rows() method

IlyaFaer added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: bigquery Issues related to the BigQuery API. labels Jan 20, 2020
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 20, 2020
ValueError: if table's schema is not set or `rows` is not a `Sequence`.
"""
if not isinstance(rows, (collections_abc.Sequence, collections_abc.Iterator)):
raise TypeError("rows argument should be a sequence of dicts or tuples")

Copy link
Copy Markdown
Author

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

Adding Iterator too as insert_rows_from_dataframe() calls insert_rows() with iterator returned by itertools.islice. dict still will give a False at this statement

IlyaFaer requested a review from tswast January 20, 2020 13:00
IlyaFaer marked this pull request as ready for review January 20, 2020 13:00
IlyaFaer requested a review from a team January 20, 2020 13:00
tswast merged commit 0280a94 into googleapis:master Jan 23, 2020
This was referenced Jan 29, 2020
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 join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL