I am working on a project which requires me to connect through R to a Snowflake database to pull data from it. However, since we use multifactor authentication to access the DB. I couldnt establish a connection and end up getting timed out.
I use the following piece to code to try to connect,
library("RJDBC")
#Establish connection to snowflake
jdbcDriver <- JDBC(driverClass="com.snowflake.client.jdbc.SnowflakeDriver", classPath="snowflake-jdbc-3.0.19.jar")
jdbcConnection<-dbConnect(jdbcDriver, "jdbc:snowflake://<<company>>.<<region>>.snowflakecomputing.com", "username","password")