Skip to main content
images/snowflake.svg Automate your healthcare workflows with Snowflake integrations and Morf. Snowflake is a cloud-based data warehousing platform for analyzing and querying large datasets. Save event data from a Morf workflow to a Snowflake table.

Getting started

Creating the Morf role, warehouse, and database in Snowflake

Replace the first line of the following script, then run it:
set morfPassword = '<MORF_PASSWORD>'; -- ⚠️ Replace me with a strong password

begin;

-- create Morf role
use role securityadmin;
create role if not exists MORF_HEALTH;
grant role MORF_HEALTH to role sysadmin;

-- create Morf user
create user if not exists MORF_HEALTH
    password = $morfPassword
    default_role = 'MORF_HEALTH'
    default_warehouse = 'MORF_HEALTH';

grant role MORF_HEALTH to user MORF_HEALTH;

-- change role to sysadmin for warehouse / database steps
use role sysadmin;

-- create Morf warehouse
create warehouse if not exists MORF_HEALTH
    warehouse_size = xsmall
    warehouse_type = standard
    auto_suspend = 60
    auto_resume = true
    initially_suspended = true;

-- create Morf database
create database if not exists MORF_HEALTH;

-- grant Morf warehouse access
grant usage
    on warehouse MORF_HEALTH
    to role MORF_HEALTH;

-- grant Morf database access
grant ownership
    on database MORF_HEALTH
    to role MORF_HEALTH;

-- grant Morf schema access
grant ownership
    on schema MORF_HEALTH.PUBLIC
    to role MORF_HEALTH;

commit;