push_data: Pushing data from data.frame object into SQL table on SQL...

Description Usage Arguments Note Examples

View source: R/functions.R

Description

This function pushes data from data.frame object into SQL table on SQL server.

Usage

1
2
push_data(connectionString, df, sqltabname, append = TRUE,
  showprogress = FALSE, quotes = "auto", separator = "|")

Arguments

connectionString

SQL connection string.

df

Data.Frame to be pushed into SQL table.

sqltabname

SQL table name.

append

Append new rows (If append == TRUE then appending new rows into existing SQL table. If append == FALSE then deletes rows in existing SQL table and appends new records. Default value is set to TRUE).

showprogress

Showing progress (default value is set to FALSE).

quotes

When "auto", character fields, factor fields and column names will only be surrounded by double quotes when they need to be; i.e., when the field contains the separator sep, a line ending \n, the double quote itself. If FALSE the fields are not wrapped with quotes even if this would break the CSV due to the contents of the field. If TRUE double quotes are always included other than around numeric fields, as write.csv. Default value is set to "auto".

separator

Default is "|". This determines what separator is used during csv is generated.

Note

Table is automatically created if doesn't exist on SQL Server with automatically identified data types.

How to set up SQL Server connection string see set_connString.

Examples

1
2
3
4
## Not run: 
push_data(connectionString, dataFrame, "dbo.TableName")

## End(Not run)

martinkabe/RSQLS documentation built on June 19, 2020, 8:47 a.m.