db_merge_into: Merge data into SQL database

Description Usage Arguments Author(s) Examples

Description

Merge data into SQL database

Usage

1
2
db_merge_into(db, table, values, by, id_colname = NULL, backend = "insert",
  return = TRUE, ...)

Arguments

db

dplyr src_* object

table

Name of table, as character

values

data.frame

by

Character vector of column names to use for the merge

id_colname

Column name for the database ID. If NULL, ignore id column.

backend

Which backend to use for copy operation. Default is "insert".

...

Additional arguments to backend_* function

Author(s)

Alexey Shiklomanov <ashiklom@bu.edu>

Examples

1
2
3
4
5
6
7
8
data(iris)
tablename <- 'projects'
input <- data.table(
  code = 'test',
  description = 'example')
key <- 'code'
dbname <- 'leaf_spectra'
merge_with_sql(input, tablename, key = 'code')

ashiklom/dbhelpers documentation built on May 12, 2019, 4:41 a.m.