in_schema

0th

Percentile

Refer to a table in a schema

Refer to a table in a schema

Usage
in_schema(schema, table)
Arguments
schema, table

Names of schema and table.

Aliases
  • in_schema
Examples
# NOT RUN {
in_schema("my_schema", "my_table")

# Example using schemas with SQLite
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
src <- src_dbi(con, auto_disconnect = TRUE)

# Add auxilary 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"))
# }
Documentation reproduced from package dbplyr, version 1.2.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.