8000 pandas extension `pg_copy_from` silently converts `text` objects to `str` · Issue #25 · dssg/ohio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pandas extension pg_copy_from silently converts text objects to str #25

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 y 8310 ou account related emails.

Already on GitHub? Sign in to your account

Open
not-the-fish opened this issue Mar 23, 2021 · 0 comments
Open

Comments

@not-the-fish
Copy link
not-the-fish commented Mar 23, 2021

As a user, I expect, because I am also passing a sqlalchemy connectable, that pg_copy_from would respect the properties of a text object passed as the query (including using the default values of any bound parameters at execution), but it silently converts the text object to a plain str.

A couple of solutions are possible:

  1. Document that the copy extensions convert things to string (and maybe give a warning when getting something other than a string)
  2. Support text objects in a way compatible with user expectations of sqlalchemy

2 seems nicer but 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0