Reputation: 502
I have to use SSO to authenticate, which I do via a browser. I run queries with:
$ snowsql -a <ACCOUNT> -u <USERNAME> -r <ROLE> --authenticator externalbrowser -f foo.sql
However, this requires me to do the annoying browser authentication process every time. I know that account/user/role can be put in the config, those are not the problem since I often change all three - but I'd like to avoid having to open/close the browser for SSO auth every time I run a query.
Is there a way to make SnowSQL cache the credentials, so that on repeated runs like this, I don't have to reauthenticate?
Upvotes: 0
Views: 655
Reputation: 9788
Key pair authentication is documented here: https://docs.snowflake.com/en/user-guide/key-pair-auth.html
In my view it is the best solution when using the CLI and you want the authorisation steps to be as minimal as possible
Upvotes: 1