-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pass-through block
parameter from dbGetQuery() to fetch()
#44
Comments
Is there any way one can override the default and set the |
I did this as a temporary workaround (since I am using multiple databases at once): setMethod("dbGetQuery", signature(conn="JDBCConnection", statement="character"), def=function(conn, statement, ...) {
r <- dbSendQuery(conn, statement, ...)
on.exit(.jcall(r@stat, "V", "close"))
if (conn@jc %instanceof% "com.amazonaws.athena.jdbc.AthenaConnection") fetch(r, -1, 999) # Athena can only pull 999 rows at a time
else fetch(r, -1)
}) |
Right, you can simply use q <- dbSendQuery(c, ...)
fetch(q, -1, block=999)
I guess the issue here is that we could pass-through the |
block
parameter from dbGetQuery() to fetch()
The workaround works, thanks! But yeah, it'd be great if dbGetQuery would pass this through or if one could set this as an option more globally? |
This is fixed in |
The Amazon Athena driver (http://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html) fails with
RJDBC sets a fetch block size of 2048 by default (https://github.com/s-u/RJDBC/blob/master/R/class.R#L306) but Amazon Athena wants the size to be <= 999 (this number is not actually documented).
The text was updated successfully, but these errors were encountered: