Creating a resource integration requires an administrator role. If you do not have administrator access, ask your administrator to create the integration before you begin.
- A Snowflake user, role, database, and schema configured for the platform
- A Snowflake integration registered on the platform
- A workstation notebook that reads data from Snowflake
- A Metaflow flow that queries Snowflake
Set up Snowflake resources
Create a Snowflake user and role that can read and write to a database. You can use an existing user, role, and database if you have them. Otherwise, use the following template to create the minimal components:Minimal Snowflake setup SQL
Minimal Snowflake setup SQL
Register the Snowflake integration
- Select Integrations in the left-hand navigation.
- Click Snowflake in the Add an Integration section.
- Enter a name for the integration.
- Enter a description for the integration.
- Enter your Snowflake credentials.
- Click Add.
Download the tutorial content
Download the tutorial content to your workstation:~/learn/snowflake. If you prefer a different location, replace ~/learn with a directory of your choice.
Validate your setup
Open the notebook in00-nb from the ~/learn/snowflake directory. Before running it, update the integration, schema, and table_name variables with your Snowflake integration name, schema, and table. This notebook validates that you can access Snowflake from an Anaconda Platform workstation.
Query Snowflake from a notebook
The same notebook walks you through reading data from Snowflake after validation succeeds.Query Snowflake from a flow
Open the01-flow directory from the ~/learn/snowflake directory. This directory contains a Metaflow flow that queries Snowflake. Before running it, update the my_integration, my_schema, and my_table_name variables in flow.py with the same values you used in the notebook.
Run the flow:
Next steps
To build on this tutorial:- Query multiple tables and join data across schemas.
- Build automated reporting pipelines that read from Snowflake.
- Integrate Snowflake queries into your ML training workflows.