1
votes

I am new to snowflake. I am creating an ETL job where we need to access the snowflake database.

I am trying to connect to snowflake from two places. One from the ec2 instance using a shell script and other from pyspark in aws glue. When I am trying to connect from a shell script, I am keeping my password in the config file and when I am trying to connect from pyspark, I have to give my password as below

sfOptions = { "sfURL" : 'xxx', "sfAccount" : 'xxx', "sfUser" : 'xxx', "sfPassword" : 'xxx', "sfDatabase" : 'xxx', "sfSchema" : 'xxx' }

But I don't want to give a password like this as it is not safe. I want passwordless login or key pair authentication login from both shell script and pyspark. I did find one doc here https://docs.snowflake.net/manuals/user-guide/snowsql-start.html#using-key-pair-authentication

But I don't know whether it will work in pyspark and shell script. and if it works, then how to pass the password in sfOption shown above. Basically, I don't want to give "sfPassword" : 'xxx' in the above connection.

1

1 Answers