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

copy_to with in_schema fails with DBI 1.0.0 #3646

Closed
OssiLehtinen opened this issue Jun 7, 2018 · 4 comments
Closed

copy_to with in_schema fails with DBI 1.0.0 #3646

OssiLehtinen opened this issue Jun 7, 2018 · 4 comments

Comments

@OssiLehtinen
Copy link

Using copy_to from dbplyr with in_schema name definition results in an error message, when working with DBI 1.0.0

copy_to(con, mtcars, name=in_schema("TEMP", "MTCARS"))
#> Error: Can't unquote TEMP.MTCARS

The code for method dbUnquoteIdentifier in DBI's quote.R seems to have changed, which I suspect is causing the problem. I think it doesn't like the "." produced by in_schema.

The previous version I was using (DBI 0.8.0) didn't have this issue.

Some technical specs: I'm running under Redhat 7, and the database is IBM db2 via odbc.

Please let me know if some essintial info is missing, and thanks for any help in advance!

Br, Ossi

@krlmlr
Copy link
Member

krlmlr commented Jun 7, 2018

Thanks. Does it work if you use DBI::Id(schema = "TEMP", name = "MTCARS") instead of in_schema(...) ? We need to think of a way to make dbplyr comatible with DBI >= 1.0.0 again.

@OssiLehtinen
Copy link
Author

Unfortunately, doesn't seem to work either.

copy_to(con, mtcars, name=DBI::Id(schema = "TEMP", name = "MTCARS"))
#> Error: is_string(x = name) is not TRUE

@ghost
Copy link

ghost commented Jun 25, 2018

This issue was moved by krlmlr to tidyverse/dbplyr/issues/119.

@ghost ghost closed this as completed Jun 25, 2018
@lock
Copy link

lock bot commented Dec 22, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Dec 22, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants