Learn R Programming

etl (version 0.4.1)

smart_upload: 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

Run this code
if (FALSE) {
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")
}
}

Run the code above in your browser using DataLab