Skip to main content
This tutorial walks you through setting up a test Snowflake data warehouse and connecting it to Anaconda Platform so you can query data from your workstations and Metaflow flows.
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.
By the end of this tutorial, you will have:
  • 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:

Register the Snowflake integration

  1. Select Integrations in the left-hand navigation.
  2. Click Snowflake in the Add an Integration section.
  3. Enter a name for the integration.
  4. Enter a description for the integration.
  5. Enter your Snowflake credentials.
  6. Click Add.
The integration panel includes a query to run on Snowflake to establish the security integration.

Download the tutorial content

Download the tutorial content to your workstation:
The Snowflake tutorial content is in ~/learn/snowflake. If you prefer a different location, replace ~/learn with a directory of your choice.
This command downloads all tutorial content as a single bundle. If you’ve already worked through other tutorials, you likely already have this and do not need to run the command again.

Validate your setup

Open the notebook in 00-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 the 01-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.