in_schema("my_schema", "my_table")
in_catalog("my_catalog", "my_schema", "my_table")
# eliminate quotes
in_schema(sql("my_schema"), sql("my_table"))
# Example using schemas with SQLite
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
# Add auxiliary schema
tmp <- tempfile()
DBI::dbExecute(con, paste0("ATTACH '", tmp, "' AS aux"))
library(dplyr, warn.conflicts = FALSE)
copy_to(con, iris, "df", temporary = FALSE)
copy_to(con, mtcars, in_schema("aux", "df"), temporary = FALSE)
con %>% tbl("df")
con %>% tbl(in_schema("aux", "df"))
Run the code above in your browser using DataLab