Back to integrations
Dagster + Snowflake

Dagster + Snowflake

An integration with the Snowflake data warehouse. Read and write natively to Snowflake from Software Defined Assets.

About this integration

This library provides an integration with the Snowflake data warehouse. Connect to Snowflake as a resource, then use the integration-provided functions to construct an op to establish connections and execute Snowflake queries. Read and write natively to Snowflake from Dagster's software-defined assets (SDAs).


pip install dagster-snowflake


# Read the docs on Resources to learn more:
# This integration also offers an IO manager. Learn more:
from dagster import Definitions, EnvVar, asset
from dagster_snowflake import SnowflakeResource
import os

def my_table(snowflake: SnowflakeResource):
  with snowflake.get_connection() as conn:
    return conn.cursor().execute_query("SELECT * FROM foo")

defs = Definitions(
      "snowflake": SnowflakeResource(
            account="snowflake account",
            user="snowflake user",
            database="snowflake database",
            schema="snowflake schema",
            warehouse="snowflake warehouse",

About Snowflake

A cloud-based data storage and analytics service, generally termed "data-as-a-service". Snowflake's data warehouse is one of the most widely adopted cloud warehouses for analytics.