Skip to content

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

@bschulth

Description

@bschulth

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions