Skip to content

Conversation

IlyaFaer
Copy link

@IlyaFaer IlyaFaer commented Jan 20, 2020

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

@IlyaFaer 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 googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 20, 2020
"""
if not isinstance(rows, (collections_abc.Sequence, collections_abc.Iterator)):
raise TypeError("rows argument should be a sequence of dicts or tuples")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 IlyaFaer requested a review from tswast January 20, 2020 13:00
@IlyaFaer IlyaFaer marked this pull request as ready for review January 20, 2020 13:00
@IlyaFaer IlyaFaer requested a review from a team January 20, 2020 13:00
@tswast tswast merged commit 0280a94 into googleapis:master Jan 23, 2020
This was referenced Jan 29, 2020
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