In order to connect Snowflake with R you will need to install the dplyr.snowflakedb
library using the devtools as follows:
devtools::install_github("snowflakedb/dplyr-snowflakedb")
Let’s provide a snippet code:
Sys.getenv("JAVA_HOME") Sys.setenv(JAVA_HOME="C:\\Program Files\\Java\\jdk-1.8\\jre") Sys.getenv("JAVA_HOME") library(RJDBC) library(dplyr) library(dplyr.snowflakedb) options(dplyr.jdbc.classpath = "C:\\Driver\\snowflake-jdbc-3.11.1.jar") my_db <- src_snowflakedb(user = "USERNAME" , password = "PASSWORD", account = "test",host = 'test.us-east-1.snowflakecomputing.com',opts = list(warehouse = "WAREHOUSE_NAME",db='DATABASE_NAME',schema='SCHEMA_NAME')) tbl(my_db, "TABLE_NAME")
References: Snowflake Community