Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigQuery: Replace table.insert_data() with client.create_rows() #4151

Merged
merged 6 commits into from
Oct 11, 2017

Conversation

alixhami
Copy link
Contributor

No description provided.

@alixhami alixhami added the api: bigquery Issues related to the BigQuery API. label Oct 10, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 10, 2017
See
https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/insertAll

:type table: :class:`~google.cloud.bigquery.client.Table`

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


for index, row in enumerate(rows):
if isinstance(row, dict):
row = table.row_from_mapping(row)

This comment was marked as spam.

This comment was marked as spam.

@alixhami alixhami merged commit 403bfc4 into googleapis:bigquery-b2 Oct 11, 2017
@alixhami alixhami deleted the bq-create-rows branch October 11, 2017 19:24
tswast pushed a commit that referenced this pull request Oct 12, 2017
* replaces table.insert_data() with client.create_rows()

* client.create_rows() accepts list of dicts as rows parameter

* adds system test for rows given as list of dictionaries to create_rows()

* adds test for create_rows() with list of Rows

* removes unused test function

* client.create_rows() accepts TableReference
tswast pushed a commit that referenced this pull request Oct 16, 2017
* replaces table.insert_data() with client.create_rows()

* client.create_rows() accepts list of dicts as rows parameter

* adds system test for rows given as list of dictionaries to create_rows()

* adds test for create_rows() with list of Rows

* removes unused test function

* client.create_rows() accepts TableReference
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants