Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 799 Bytes

README.md

File metadata and controls

21 lines (17 loc) · 799 Bytes

upsertR

upsertR is a simple R package that supports upserting an R dataframe to a target SQL server

Installing upsertR

Install the package directly from github with devtools. Run the first line if you do not currently have devtools installed.

# install.packages('devtools') 
devtools::install_github('HenrikVarmer/upsertR')

Functions

There is only one core function in upsertR: Rupsert(), which lets you upsert a dataframe to a target SQL server. See below for an example.

upsert(con,    # SQL server connections string
       df,     # input dataframe
       schema, # Target schema name on SQL server
       table,  # Target table name on SQL server
       delete = TRUE) # specifies whether to delete old ID's not present in input DF. TRUE deletes old ID's