Closed ajdamico closed 7 years ago
no rush
looks related to https://github.com/hannesmuehleisen/MonetDBLite/issues/164
library(lodown)
library(DBI)
tf <- tempfile()
csvfile <- tempfile()
dbdir <- file.path( tempdir() , "dbdir" )
db <- dbConnect( MonetDBLite::MonetDBLite() , dbdir )
cachaca( 'ftp://ftp.cdc.gov/pub/data/Brfss/CDBRFS91XPT.zip' , tf, mode = 'wb' )
unzipped_files <- unzip( tf )
x <- foreign::read.xport(unzipped_files)
names(x) <- tolower(names(x))
names(x)[names(x) == "level"] <- "level_"
write.csv(x, csvfile, row.names = FALSE)
rtctr <- nrow(x)
# correctly fails
dbWriteTable(db, 'tablename', csvfile, na.strings = "NA", nrow.check = rtctr, lower.case.names = TRUE)
# immediately afterwards
# this SHOULD work
dbSendQuery(db, "CREATE TABLE tablename (colname DOUBLE PRECISION)" )
# Error in .local(conn, statement, ...) :
# Unable to execute statement 'CREATE TABLE tablename (colname DOUBLE PRECISION)'.
# Server says 'ParseException:SQLparser:'.
yes i think thats a duplicate of https://github.com/hannesmuehleisen/MonetDBLite/issues/164
once you fix #164, please just copy and paste my code into a console to verify this is fixed as well? thanks
this works now :)
hi, i believe the unix/windows brfss crashes on sisyphus are the result of today's jul2017lite-r merge. if it is not obvious to you how to fix it, please assign this task to me and i will try to narrow to a minimal reproducible example -- but it might take me two weeks? thanks homie