Skip to content

pandas.DataFrame.to_gbq missing method of writting #29598

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

Closed
OmerJog opened this issue Nov 13, 2019 · 5 comments · Fixed by #30447
Closed

pandas.DataFrame.to_gbq missing method of writting #29598

OmerJog opened this issue Nov 13, 2019 · 5 comments · Fixed by #30447
Labels
Needs Tests Unit test(s) needed to prevent regressions

Comments

@OmerJog
Copy link

OmerJog commented Nov 13, 2019

BigQuery support 3 different types of load methods:
WRITE_EMPTY, WRITE_TRUNCATE, WRITE_APPEND
https://cloud.google.com/bigquery/docs/reference/auditlogs/rest/Shared.Types/WriteDisposition

this parameter needs to be controlled by loading job.

@TomAugspurger
Copy link
Contributor

Does pandas-gbq support this?

@OmerJog
Copy link
Author

OmerJog commented Nov 14, 2019

@TomAugspurger yes
https://pandas-gbq.readthedocs.io/en/latest/writing.html#writing-to-an-existing-table
"Use the if_exists argument to dictate whether to 'fail', 'replace' or 'append' if the destination table already exists. The default value is 'fail'."

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Nov 14, 2019 via email

@OmerJog
Copy link
Author

OmerJog commented Nov 16, 2019

@TomAugspurger yes. It's just exposing this parameter in the to_gbq function.

I currently don't have the time to do work on this. Maybe i'll be able to in a few months so if someone want to pick it up - be my guest.

@charlesdong1991
Copy link
Member

charlesdong1991 commented Nov 17, 2019

emm, but seems pandas already supports if_exists? or do you mean this argument is not functioning correctly?

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_gbq.html

@OmerJog

Seems a Needs Tests label is more appropriate for this issue since there seems no tests to this case. @jbrockmendel

@jbrockmendel jbrockmendel added the Needs Tests Unit test(s) needed to prevent regressions label Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Tests Unit test(s) needed to prevent regressions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants