Connect your Snowflake
Prerequisitesโ
Step 1: Set up Whaly-specific entities in Snowflakeโ
-- Set variables (these need to be uppercase)
set whaly_bi_username = 'WHALY_BI_USER';
set whaly_bi_password = 'you_should_change_me';
-- This shouldn't be modified
set whaly_bi_role = 'WHALY_BI_ROLE';
set whaly_bi_warehouse = 'WHALY_BI_WAREHOUSE';
begin;
-- create Whaly roles
use role securityadmin;
create role if not exists identifier($whaly_bi_role);
grant role identifier($whaly_bi_role) to role SYSADMIN;
-- create Whaly user
create user if not exists identifier($whaly_bi_username)
password = $whaly_bi_password
default_role = $whaly_bi_role
default_warehouse = $whaly_bi_warehouse;
grant role identifier($whaly_bi_role)
to user identifier($whaly_bi_username);
-- change role to sysadmin for warehouse / database steps
use role sysadmin;
-- create Whaly warehouse
create warehouse if not exists identifier($whaly_bi_warehouse)
-- set the size based on your dataset
warehouse_size = medium
warehouse_type = standard
auto_suspend = 120
auto_resume = true
initially_suspended = true
statement_timeout_in_seconds = 600;
-- grant Whaly Warehouse access
grant USAGE
on warehouse identifier($whaly_bi_warehouse)
to role identifier($whaly_bi_role);
-- create Private Whaly database (used for SQL queries schema inference)
create database if not exists WHALY_PRIVATE;
grant USAGE
on database WHALY_PRIVATE
to role identifier($whaly_bi_role);
create schema if not exists WHALY_PRIVATE.SQL_SCHEMA_INFER;
grant USAGE, CREATE VIEW
on schema WHALY_PRIVATE.SQL_SCHEMA_INFER
to role identifier($whaly_bi_role);
commit;Step 2: Set up Snowflake as a Warehouse in Whaly
Account ID
User
Password
How to get the Snowflake Account URL?
If you have a standard Snowflake edition

If you have a multi cluster Snowflake edition

Last updated
Was this helpful?
