snowflakedb / dplyr-snowflakedb

SnowflakeDB backend for dplyr
Apache License 2.0
65 stars 25 forks source link

key pair authentication #27

Open scottporter opened 4 years ago

scottporter commented 4 years ago

Is it yet possible to connect using dplyr-snowflakedb and key pair authentication?

I think maybe key pair authentication is new to snowflakedb, and I don't see how to pass in the right info to connect.

In other words, if you've followed the directions at: https://docs.snowflake.net/manuals/user-guide/jdbc-configure.html#using-key-pair-authentication then how would you connect using your private key?

kepiej commented 4 years ago

You can do this by adding a "private_key_file" to the list of options:

snowflake_con <- src_snowflakedb(user = <your username>, host = <host url>, opts = list(private_key_file = <path to private key file>, warehouse = <your warehouse>, db = <your db>, schema = <your schema>))

I hope this helps! :)

anilguptausa commented 4 years ago

Hi @kepiej, I tried your syntax and but unfortunately wasn't able to get it working. Do you know what the syntax would look like if the private key file has a password?