dbDisconnect error on CentOS
mpgilliam opened this issue · 8 comments
When executing the code example of connecting to Impala, running a query, and disconnecting as shown in the README there is an error "type must be a single element of type 'character'" when attempting to disconnect. OS: CentOS, Implyr Version: 0.2.2
I'm not able to reproduce this error in my tests on CentOS. Can you paste the code you're using to connect and disconnect (with credentials redacted)? Thanks.
Code Ran:
library(odbc) # Version 1.1.5
library(dplyr) # Version 0.7.4
library(implyr) # Version 0.2.2
drv <- odbc::odbc()
imp <- src_impala(drv = drv, driver = "Cloudera ODBC Driver for Impala", host = "IP", port = 21050, database = "DB")
df <- dbGetQuery(imp, "select * from DB.TABLE")
dbDisconnect(imp)
Error Received:
Error: type must be a single element of type 'character'
System Info:
$ lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.9 (Final)
Release: 6.9
Codename: Final
This looks like a method dispatch error. implyr passes along the dbDisconnect()
call to the underlying connection in imp$con
but it looks like something might be going wrong there. Does the error go away if you do: dbDisconnect(imp$con)
?
This is mystifying me. Can you run traceback()
immediately after the error occurs and paste the output here? That should help me to understand which function in which package is throwing the error. Thanks.
I was finally able to reproduce this error. I'll work on resolving it as soon as I can.
This is fixed in the version of implyr on GitHub (67ba460).
Can you install the development version of implyr from GitHub to see if this solves the problem for you?
devtools::install_github("ianmcook/implyr")
I will include this fix in the next CRAN release of implyr.
This is fixed in implyr version 0.2.3 on CRAN.