dbxUpsert | R Documentation |
Upsert records
dbxUpsert(
conn,
table,
records,
where_cols,
batch_size = NULL,
returning = NULL,
skip_existing = FALSE
)
conn |
A DBIConnection object |
table |
The table name to upsert |
records |
A data frame of records to upsert |
where_cols |
The columns to use for WHERE clause |
batch_size |
The number of records to upsert in a single statement (defaults to all) |
returning |
Columns to return |
skip_existing |
Skip existing rows |
## Not run:
db <- dbxConnect(adapter="postgres", dbname="dbx")
table <- "forecasts"
DBI::dbCreateTable(db, table, data.frame(id=1:3, temperature=20:22))
records <- data.frame(id=c(3, 4), temperature=c(20, 25))
dbxUpsert(db, table, records, where_cols=c("id"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.