I have a JDBC connection and would like to query data from one schema and save to another
library(tidyverse)
library(dbplyr)
library(rJava)
library(RJDBC)
# access the temp table in the native schema
tbl(conn, "temp")
temp_ed <- temp %*% mutate(new = 1)
# I would like to save temp_ed to a new schema "schmema_new"
I would like to use something like dbplyr::compute()
but define the output schema specifically. It seems dbplyr::copy_to
could be used, but would require bringing the data through the local machine.
I want to use something like RJDBC::dbSendUpdate()
but which would ideally integrate nicely with the data manipulating pipeline above.