convert csv to sqlite adapted from https://rdrr.io/github/coolbutuseless/csv2sqlite/src/R/csv2sqlite.R
csv2sqlite(
csv_file,
sqlite_file,
table_name,
transform = NULL,
chunk_size = 5e+06,
append = FALSE,
col_types = NULL,
na = c(NA, "..", "", "...", "F"),
text_encoding = "UTF-8",
delim = ",",
...
)
A database connection
input csv path
output sql database path
sql table name
optional function that transforms each chunk
optional chunk size to read/write data, default=1,000,000
optional parameter, append to database or overwrite, defaul=`FALSE`
optional parameter for csv column types
na character strings
encoding of csv file (default UTF-8)
(Optional) csv deliminator, default is ","
(Optional) additional parameters passed to `readr::read_delim_chunked`