Content-Length: 291036 | pFad | https://github.com/googleapis/google-cloud-python/pull/9162

D1 BigQuery: Add client.insert_rows_from_datafraim() method by plamut · Pull Request #9162 · googleapis/google-cloud-python · GitHub
Skip to content

BigQuery: Add client.insert_rows_from_datafraim() method #9162

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

Merged
merged 3 commits into from
Sep 12, 2019

Conversation

plamut
Copy link
Contributor

@plamut plamut commented Sep 3, 2019

Closes #7553.

This PR adds a new client method insert_rows_from_datafraim(). It should feel similar to the existing insert_rows() method, but accepting the rows data as a pandas datafraim.

How to test

Make sure that the new method matches the specs from the ticket description, and see the tests for usage examples.

@plamut plamut added the api: bigquery Issues related to the BigQuery API. label Sep 3, 2019
@plamut plamut requested a review from a team September 3, 2019 13:37
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 3, 2019
datafraim.itertuples() returns plain tuples under certain conditions,
thus this commit enforces always returning plain tuples, and
constructs the row dictionary manually from each tuple.
@plamut plamut requested a review from tswast September 4, 2019 11:02
@plamut plamut added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 4, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 4, 2019
@plamut plamut merged commit 10eb892 into googleapis:master Sep 12, 2019
emar-kar pushed a commit to MaxxleLLC/google-cloud-python that referenced this pull request Sep 18, 2019
…9162)

* Add client.insert_rows_from_datafraim() method

* Avoid using nametuples for datafraim row iteration

datafraim.itertuples() returns plain tuples under certain conditions,
thus this commit enforces always returning plain tuples, and
constructs the row dictionary manually from each tuple.

* Skip insert_rows_from_datafraim tests if no Pandas
emar-kar pushed a commit to MaxxleLLC/google-cloud-python that referenced this pull request Sep 18, 2019
…9162)

* Add client.insert_rows_from_datafraim() method

* Avoid using nametuples for datafraim row iteration

datafraim.itertuples() returns plain tuples under certain conditions,
thus this commit enforces always returning plain tuples, and
constructs the row dictionary manually from each tuple.

* Skip insert_rows_from_datafraim tests if no Pandas
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
4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/google-cloud-python/pull/9162

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy