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

Add support for tables defined via DBI::Id(schema = "my_schema", table = "my_table") #95

Open
bschulth opened this issue Aug 1, 2022 · 0 comments

Comments

@bschulth
Copy link

bschulth commented Aug 1, 2022

Currently, if you have a multi-schema database, you cannot access schema specifically using the

  • DBI::Id functionality.

    • https://dbi.r-dbi.org/reference/id
    •   table <- DBI::Id(schema = "my_schema", table = "my_cars")
        DBI::dbWriteTable(conn, name = table, value = mtcars, overwrite=FALSE, append=TRUE)
    • Ideally all of the functions would use DBI::dbQuoteIdentifier to resolve the table object, or use slots
    •  DBI::dbQuoteIdentifier(conn, table)
      
       # <SQL> "my_schema"."my_cars"
  • As such when trying to update tables with dbWriteTable in a particular schema and you want to not overwrite, but append, the code will error out because things like dbExistsTable fail to detect the table already exists in the other schema.

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