You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error when trying to write a table to a mysql connection with copy_to():
> sanbs_db <- src_mysql("sanbs", host = "localhost", user = "root")
> results_diagnostic.db <- copy_to(sanbs_db, results_diagnostic, temporary = FALSE, indexes = list(c("result_id","donation_id")))
Error in if (n <= 65535) { : missing value where TRUE/FALSE needed
I believe the error occurs because I have true NAs in character fields, and the following check in src-mysql.r produces n=NA instead of the expected maximum length:
db_data_type.MySQLConnection <- function(con, fields, ...) {
char_type <- function(x) {
n <- max(nchar(as.character(x), "bytes"))
if (n <= 65535) {
paste0("varchar(", n, ")")
} else {
"mediumtext"
}
}
I get the following error when trying to write a table to a mysql connection with copy_to():
I believe the error occurs because I have true NAs in character fields, and the following check in src-mysql.r produces n=NA instead of the expected maximum length:
the problem can be demonstrated with:
I'm not sure what this means for writing NULL values into the db table.
The text was updated successfully, but these errors were encountered: