df_to_sql: DataFrame to SQL; Write your DataFrame or Tibble directly to...

Description Usage Arguments Value Examples

View source: R/df_to_sql.R

Description

DataFrame to SQL; Write your DataFrame or Tibble directly to SQL from R

Usage

1
df_to_sql(dataframe, driver, server, database, sql_table_name, ...)

Arguments

dataframe

A DataFrame or Tibble ie PopHealthData

driver

A driver for database ie "SQL Server"

server

The unique name of your database server

database

The name of the database to which you will write 'dataframe'

sql_table_name

The name that 'dataframe' will be referred to in SQL database

...

Function forwarding for additional functionality

Value

A DataFrame or Tibble written to a SQL database of your choice

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(odbc)
library(DBI)
health_data <- SangerTools::PopHealthData
df_to_sql(dataframe = health_data,
            driver  = "SQL SERVER",
           database = "DATABASE",
     sql_table_name = "New Table Name")

## End(Not run)

ald0405/SangerTools documentation built on Jan. 14, 2022, 9:42 p.m.