generate_create_table_sql: Generate create table DDL from a dataframe

Description Usage Arguments Value Examples

View source: R/etl_functions.R

Description

Generates SQL to create a new table from R dataframe- useful in conjuction with copying from s3 to Redshift

Usage

1

Arguments

table_name

name of table to create on Redshift

df

R dataframe object

Value

string with create table syntax, can be plugged into dbGetQuery

Examples

1
2
3
redshift_conn <- create_redshift_con()
sql_create_statement <- generate_create_table_sql("data.activations",activation_data)
dbGetQuery(redshift_conn, sql_create_statement)

Everlane/everlaneR documentation built on Oct. 7, 2020, 3:13 p.m.