InsertDataFrameToRedshift: Creates a Redshift table with the same contents as the given...

Description Arguments Value Author(s)

Description

Given an R data frame, or equivalently, any data.frame like object, the function will create a redshift table tthat mimics the contents of the R object. This copy is done by first copying then object onto and s3 bucket as a .csv, and then uploading to redshift from there.

The yaml file must contain host, dbname, s3 bucket name, user and password.

Arguments

df

a data.frame or data.frame like object

tableName

The name of the redshift table to create or append to

columnTypes

A character vector with the same length as the number of columns on df. Each element must be a Redshift compatible type. If not provided, te column types will be guessed automatically

schema

Character vector with length 1 with the name of the DB schema were the table will be created

clean

Boolean indicating whether or not to remove existing records from the table before inserting

dbID

The name of the yaml group containing the database credentials

s3ID

The name of the yaml group containing the s3 bucket credentials

yamlConfig

The path to the yaml file

Value

The function will return a boolean value indicating if the process completed successfully

Author(s)

João Monteiro and Henrique Cabral


rvladimiro/dafR documentation built on June 26, 2019, 4:37 a.m.