Key Pair Authentication
In this tutorial we will show how to connect to your Snowflake account via python with an authentication token/key.
For the official Snowflake documentation this tutorial was based on: https://docs.snowflake.com/en/user-guide/key-pair-auth
Video
Requirement
- This tutorial assumes you have nothing in your Snowflake account (Trial) and no complex security needs.
- This tutorial assumes you've already have a private key, if not here is a tutorial
Download needed files:
- Files (Link)
Install
Lets start by updating our code to use the stream we setup at the beginning. Inside our main.py
we'll update:
Using the correct account locator.
If your Snowflake account is in anther region other then US EAST (Oregon). Please append your locator with the region xy12345.us-east-1
read the Account Identifiers documentation to learn how to format your account locator based on your region.
Run
Here is the code we'll use. Please fill in the two needed areas.
Next we'll want to run that code to start generating the data which will be moved to Snowflake.