Snowflake Notebooks: SQL/Python made easy

Snowflake now has notebooks!

I first taught myself the basics of python using Jupyter Notebooks which made it easy to run sections of code at a time and see the output for each step. I found this incredibly helpful until I ran into a need to run a SQL query and use the results in a pandas dataframe. The workaround was to use yet another python package to execute the query. But now you can use Snowflake notebooks instead!

Snowflake notebooks allow you to easily execute a section/cell containing a SQL query and reference the results of that cell within your python script in the next section/cell.

First, write your SQL statement:

Second, reference that result set by calling the 'cell' name in the next section and use it in your python script!

Snowflake notebooks also has options to use markdown and streamlit.

This is a great option for prototyping/outlining a process that involves transforming data from snowflake using python.

BEWARE: if you leave your window open with a snowflake notebook open, it will continue to run. Be sure to close your window once you are done using your notebook!

Author:
Annie Casey
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab