Introduction to Jupyter Notebook
In this tutorial you will learn how to get data from snowflake into our local jupyter notebook.
Video
Installing Jupyter Notebook
The fastest way I got jupyter notebooks up and running is by installing VsCode and then creating a new file with the extension ".ipynb".
Downloads
- Notebook (Link)
Setup
Lets start with some setup.
Snowflake
If you don't have a database, schema or warehouse yet.
Lets create the table we'll query later in the notebook.
Jupyter Notebook
Please enable token caching if you get to many MFA notifications
To add our development environment we'll want to get our account identifier.
In the notebook we'll have to update our connectection parameters. Once pasted we'll make sure we replace the .
with a -
otherwise it won't connect to the account.
Results
We can follow along in the notebook or see the result in the image below.
Troubleshooting
Here are some common errors I've seen during the setup process.
Can't find module - Snowflake
If you encounter an error like "module not found" or "Can't find module," it indicates that the Snowflake Python package has not been installed in your Jupyter Notebook environment.
Solution 1
If you run into an issue where you install the dependencies but when you run the snowflake connect code it doesn't work. Try restarting the kernal.
Solution 2
If restarting the kernal did not work then you might have to change your envirement to a "virtual envirement". Steps shown below.