db_merge_into.Rd
Merge local data frame into SQL table
db_merge_into(values, table, con, by = NULL, drop = FALSE, ...)
values | `data.frame` of values to write to SQL database |
---|---|
table | Name of target SQL table, as character |
con | database connection object |
by | Character vector of columns by which to perform merge. Defaults to all columns in `values` |
drop | logical. If `TRUE` (default), drop columns not found in SQL table. |
... | Arguments passed on to
|
Data frame: Inner join of SQL table and input data frame (as unevaluated "lazy query" table)
# NOT RUN { irisdb <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") dplyr::copy_to(irisdb, iris[1:10,], name = "iris", overwrite = TRUE) db_merge_into(iris[1:12,], "iris", irisdb) dplyr::tbl(irisdb, "iris") %>% dplyr::count() # }