Skip to main content

Setting up Snowflake

This guide will walk you through configuring Snowflake to accept data from Saddle Data. We will create a dedicated role, user, warehouse, and database for the best security and isolation.

1. Run Setup Script in Snowflake

Log in to your Snowflake console and open a new Worksheet. Run the following SQL commands (you may adjust names as needed):

-- Use ACCOUNTADMIN to ensure permissions for creating roles/databases
USE ROLE ACCOUNTADMIN;

-- 1. Create a Role for SaddleData
CREATE OR REPLACE ROLE saddledata_role;

-- Important: Grant this role to SYSADMIN so you (the admin) retain access
GRANT ROLE saddledata_role TO ROLE SYSADMIN;

-- 2. Create a User
CREATE OR REPLACE USER saddledata_user
PASSWORD = 'StrongPassword123!' -- Change this to a secure password!
DEFAULT_ROLE = saddledata_role
MUST_CHANGE_PASSWORD = FALSE;

-- 3. Grant Role to User
GRANT ROLE saddledata_role TO USER saddledata_user;

-- 4. Create a Warehouse (Compute)
CREATE OR REPLACE WAREHOUSE saddledata_wh
WAREHOUSE_SIZE = XSMALL
AUTO_SUSPEND = 60
AUTO_RESUME = TRUE
INITIALLY_SUSPENDED = TRUE;

GRANT USAGE ON WAREHOUSE saddledata_wh TO ROLE saddledata_role;

-- 5. Create Database and Schema
CREATE OR REPLACE DATABASE saddledata_dest_db;
GRANT OWNERSHIP ON DATABASE saddledata_dest_db TO ROLE saddledata_role;

-- Switch to the database context to set up the schema
USE DATABASE saddledata_dest_db;

-- Create Schema
CREATE OR REPLACE SCHEMA public;
GRANT OWNERSHIP ON SCHEMA public TO ROLE saddledata_role;

2. Configure SaddleData

  1. Log in to SaddleData.
  2. Go to Connections > New Connection.
  3. Select Snowflake.
  4. Enter the details from the setup above:
    • Account: Your account identifier (e.g. abcdefg-foc12345.snowflakecomputing.com).
    • User: saddledata_user
    • Password: The password you set.
    • Database: saddledata_dest_db
    • Schema: public
    • Warehouse: saddledata_wh
    • Role: saddledata_role
  5. Click Test Connection to verify everything is working.
  6. Click Add Connection.

You are now ready to use Snowflake as a destination in your Flows!