error when using dbSendQuery on impala connection
ylcoder opened this issue · 3 comments
I am not sure if this is supported. I was trying to use that to fetch resultset in batches rather than just one shot to avoid memory footprint. dbQuery and other methods work fine. code is like the following:
library(implyr) # this is the only line for library loading
library(RJDBC)
impala <- src_impala(...) #I am using JDBC
dbSendQuery(impala, "select * from tbl1")
Error in (function (classes, fdef, mtable):
unable to find an inherited method for function 'dbSendQuery' for signature ''src_impala", "character"'
session info on windows 64bit:
R 3.4.3
rJava_0.9_9 DBI_0.8 implyr_0.2.2 dplyr_0.7. RJDBC_0.2_7
I saw the other issue you fixed the loading sequence and namespace issue with DBI so I didn't load DBI explicitly.
Thanks.
It should work if you add $con
like this:
dbSendQuery(impala$con, "select * from tbl1")
(In some places, I've implemented implyr so that DBI connection methods called on src_impala
objects automatically dispatch to the underlying DBIConnection
for convenience. But in general if you need to call a DBI method, call it on impala$con
.)
Yes. It worked. Sorry for the ignorance. I should have looked at the source code. New to R, just wanted to get somethings done quickly. Gonna make time to get familiar with it. The package is wonderful, helping me a lot for my job. Thanks a lot Ian.
No problem, thanks.