Open paesibassi opened 7 years ago
Also posted as a question on Stackoverflow, in case it's not an actual issue (apologies in that case) and somebody has a working solution. Thank you!
Hello, @gregrahn are you still supporting this package? If you give me a hint on what the problem could be, I can try to fix it myself and send you a pull request. Thanks!
@paesibassi - Sorry, but I am no longer supporting this and unfortunately have not been following dplyr development. Quickly looking at things, it looks like the database code was factored out of dplyr and into dbplyr so the method moved packages. Easiest is probably to use dplyr 0.5.0. Probably not terribly difficult to add dbplyr as a dependency to pull in its namespace and just the rename the classes (assuming the APIs are still the same). This looks to impact dplyr::src_sql
and dplyr::tbl_sql
which look to become dbplyr::src_sql
and dbplyr::tbl_sql
.
See https://github.com/snowflakedb/dplyr-snowflakedb/blob/master/R/src-snowflakedb.R#L198-L206
If lucky it's just that easy, but hopefully that points you in the right direction.
You are better off just using the JDBC connection in R
as.data.frame(dbGetQuery(jdbcConnection,'SELECT * FROM TABLE '))
@paesibassi The above response from @gregrahn is on the right track. There were breaking changes introduced in dplyr 0.5.0 and then the db code was factored out of dplyr and into dbplyr in 0.7.0. But 0.5.0 is not currently working. The currently working combination is dplyr 0.4.3 + dplyr.snowflakedb 0.1.1. The team here at Snowflake is currently looking into what is needed to support the latest versions.
Can you provide instructions on how to install earlier versions of dplyr and dplyr.snowflakedb?
This is what is currently available in the official documentation: https://www.snowflake.net/integrating-the-snowflake-data-warehouse-with-r-via-dplyr/
We are currently working to get this updated with more detailed instructions based on additional testing.
Someone also put together a complete step by step guide based on their experience (This is not an official guide and has not been fully tested beyond what is indicated. Including in case it helps in the meantime):
These versions worked in my case OSX | 10.2.5 JAVA6 | javaForOSX2015-001.dmg JAVA8 | 1.8.0_131, x86_6 rJava | 0.9.8 Snowflake JDBC | 3.0.9 R SOURCE | R-3.3.3 R Studio | 1.0.143
NOTE: If errors are encountered building rJava check for environment variable J$AVA_HOME. This variable should not be needed on OSX and appears to cause errors. Try unsetting it and building rJava.
Note: It may appear to hang while connecting, probably waiting for DUO authentication.
for what it's worth, my fork is working with newer versions of dplyr, dbplyr, etc: https://github.com/ZacharyRSmith/RSnowflake
I am able to install and load the libraries, then set the classpath pointing to the latest JDBC driver (
snowflake-jdbc-3.0.9.jar
).When trying to setup the connection object with
src_snowflakedb()
, I get the following error message (I removed the account details, but they are correct in the actual code):Indeed the current version of dplyr doesn't export nor include any
src_sql()
function:Is there any way to fix this?
Thank you!