Tableau - Key Pair Authentication
In this tutorial we will show how to connect to snowflake via tableau with key-pair as the authenitcation method.
Video
Video is still in development.
Requirement
This tutorial assumes you have nothing in your Snowflake account (Trial) and no complex security needs.
Tableau requires these versions to use key-pair:
- Snowflake ODBC driver 3.4 or later
- Tableau Desktop 2024.3 or later
Generate Key
Lets create the private and public key so that we can apply the public key to our user.
This will create two files in the folder we are currently located.
Snowflake
Lets start with applying our key to our user and then getting the account url.
Apply key to user
Lets create the user, assign the user a role and finally apply the public key to our user in a worksheet.
status |
---|
Statement executed successfully. |
Account URL
Before we leave Snowflake we'll want to copy our account url to later add to tableau.
Tableau Desktop
Lets Open tableau Desktop and add a new source that is Snowflake.
Past in url, add role name, warehouse and username. Select key-pair as authentication and browse/add your private key. Finally click sign in.
Success your login via key-pair authentication.
Tableau Cloud
Go to "My account settings" on the top right.
Find Snowflake as a source, click add.
Click the drop down and select "key-pair authentication method".
Fill in the server with the account url, role username, add your private key we generated at the start, and click add.
Once added we can test our connection to make sure it works.