GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(bigquery): check json_rows arg type in insert_rows_json() by IlyaFaer · Pull Request #10162 · googleapis/google-cloud-python ConversationFixes #10132
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
IlyaFaer
commented
|
| def insert_rows(self, table, rows, selected_fields=None, **kwargs): | |
| """Insert rows into a table via the streaming API. | |
| See | |
| https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/insertAll | |
| Args: | |
| table (Union[ \ | |
| google.cloud.bigquery.table.Table, \ | |
| google.cloud.bigquery.table.TableReference, \ | |
| str, \ | |
| ]): | |
| The destination table for the row data, or a reference to it. | |
| rows (Union[Sequence[Tuple], Sequence[dict]]): | |
| Row data to be inserted. If a list of tuples is given, each | |
| tuple should contain data for each schema field on the | |
| current table and in the same order as the schema fields. If | |
| a list of dictionaries is given, the keys must include all | |
| required fields in the schema. Keys which do not correspond | |
| to a field in the schema are ignored. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| the mappings describing one or more problems with the row. | ||
| """ | ||
| if not isinstance(json_rows, collections_abc.Sequence): | ||
| raise TypeError("json_rows argument should be a sequence of dicts") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yes, that's a good idea. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
BigQuery: raise aTypeError if a dictionary is passed to insert_rows_json
There was an error while loading. Please reload this page.