smart_upload {etl}R Documentation

Upload a list of files to the DB

Description

Upload a list of files to the DB

Usage

smart_upload(obj, src = NULL, tablenames = NULL, ...)

Arguments

obj

An etl object

src

a list of CSV files to upload. If NULL, will return all CSVs in the load directory

tablenames

a list the same length as src of tablenames in the database corresponding to each of the files in src. If NULL, will default to the same name as src, without paths or file extensions.

...

arguments passed to dbWriteTable

Examples

## Not run: 
if (require(RMySQL)) {
  # must have pre-existing database "fec"
  # if not, try
  system("mysql -e 'CREATE DATABASE IF NOT EXISTS fec;'")
  db <- src_mysql_cnf(dbname = "mtcars")
}

## End(Not run)

[Package etl version 0.4.1 Index]