Sign inGet started

Snowflake

Snowflake is a data warehouse that offers fast storage, processing, and analytics solutions. Deepnote integrates with Snowflake seamlessly to bring the cloud data warehouse to your notebook.

Snowflake cover.png

What can you do with the Snowflake integration?

The Snowflake integration allows you to query databases and explore the structure of your warehouse. Think "SQL editor" but with all the modern productivity boosters that come with Deepnote's notebook. For example:

  • Write native SQL and Python in the same notebook
  • Search your entire warehouse instantly via the integrated schema explorer
  • Get intelligent autocomplete for columns, tables, and databases
  • Interactively explore data without writing any additional code

How to connect to Snowflake

From the right-hand panel, under Integrations, click the + button and choose Create new integration.
create_integration.png

Select Snowflake from the list of integrations or search for it using the search bar.
sf_select_int.png

Fill out the fields in the pop-up form. You will need to know your account identifier for Snowflake and enter a valid username and password for authentication.
sf_modal.png

Using Snowflake with OAuth

With a Snowflake OAuth authentication, you can give every member of your Deepnote workspace their own set of credentials. You can ensure higher security by using short-lived tokens and enabling the use of multi-factor authentication. Follow the principle of least privilege and use granular access control for various Snowflake resources to ensure everyone can only access the data they need.

Deepnote supports three OAuth providers for Snowflake:

  • Snowflake's native OAuth
  • Snowflake with Azure AD
  • Snowflake with Okta

Using Snowflake in Deepnote

Now that you're connected to Snowflake, you can do the following:

Connecting to Snowflake via Python

If you prefer to connect to Snowflake with pure Python, you may use the Snowflake connector as shown in the code example below.

import snowflake.connector

conn = snowflake.connector.connect(
  user='USER',
  password='PASSWORD',
  account='ACCOUNT',
  warehouse='WAREHOUSE',
  database='DATABASE',
  schema='SCHEMA'
)

conn.cursor().execute('select * from products')