nz_import_dir_to_db: import directory

Description Usage Arguments Examples

View source: R/dataImporterClass.R

Description

Import a directory into database. The directory must have a set of csv files

Usage

1
2
3
4
5
6
7
8
nz_import_dir_to_db(
  DSN,
  directory,
  table_name,
  value_type = "varchar(100)",
  createTable = T,
  max_errors = 2
)

Arguments

DSN

The NZ DSN object made by nz_init

directory

Directory of CSV files

table_name

Name of the table to import data into

value_type

The type of Value possible options float, varchar, integer, bigint

createTable

Either make a new table and drop table if exists or append data to the existing table

max_errors

The maximumn number of rows in the csv which can include error in their values

Examples

1
## Not run: nz_import_dir_to_db()

thespatiallabatLaurier/nzdggs documentation built on Sept. 7, 2020, 4:33 p.m.