Skip to main content
This tutorial walks you through connecting Anaconda Platform to your existing Snowflake data warehouse 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 integration registered on the platform
  • A workstation notebook that reads data from Snowflake
  • A Metaflow flow that queries Snowflake
This tutorial assumes you already have a Snowflake database, user, and role set up. If you do not, see Set up a Snowflake data warehouse.

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.

Query Snowflake from a notebook

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 walks you through reading data from Snowflake.

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.