Skip to main content

Setting Up Snowflake

Our data product platform uses the DataOps methodology in the Data Cloud and is built exclusively for Snowflake. To complete the setup of the DataOps.live infrastructure, creating a Snowflake account is an essential step, among a few others. See Setting Up DataOps for detailed instructions on how to successfully complete the setup process.

You need a Snowflake account to use DataOps.live. This will be your main Snowflake account (or accounts) for production. However, for PoC purposes, it can often be quicker to create a disposable account at signup.snowflake.com. A user with the ACCOUNTADMIN role is needed to run the setup SQL.

Prerequisites

Enter your password in the PASSWORD field before running the script below to create the Snowflake instance.

Configuring a new Snowflake account

Adjust the below SQL for the trial account and according to your configuration:

Set up a Snowflake account with role, warehouse, and main user.
---- ROLES ----

-- Admin role (DATAOPS_SOLE_ADMIN_ROLE)
USE ROLE SECURITYADMIN;
CREATE OR REPLACE ROLE DATAOPS_SOLE_ADMIN_ROLE;
USE ROLE ACCOUNTADMIN;
GRANT
CREATE DATABASE, -- CREATEs needed for SOLE object creation and management
CREATE USER,
CREATE ROLE,
CREATE WAREHOUSE,
CREATE SHARE,
CREATE INTEGRATION,
CREATE NETWORK POLICY,
MANAGE GRANTS -- MANAGE GRANTS needed to allow SOLE to manage users (specifically so it can SHOW USERS internally)
ON ACCOUNT TO ROLE DATAOPS_SOLE_ADMIN_ROLE;
GRANT ROLE DATAOPS_SOLE_ADMIN_ROLE TO ROLE SYSADMIN; -- or to the most appropriate parent role

---- WAREHOUSES ----
CREATE WAREHOUSE DATAOPS_SOLE_ADMIN_WAREHOUSE WITH WAREHOUSE_SIZE='X-SMALL';
GRANT MONITOR, OPERATE, USAGE ON WAREHOUSE DATAOPS_SOLE_ADMIN_WAREHOUSE TO ROLE DATAOPS_SOLE_ADMIN_ROLE;

---- USERS ----

-- Main user
USE ROLE USERADMIN;
CREATE OR REPLACE USER DATAOPS_SOLE_ADMIN
PASSWORD = '' -- Add a secure password here, please!
MUST_CHANGE_PASSWORD = FALSE
DISPLAY_NAME = 'DataOps SOLE User'
DEFAULT_WAREHOUSE = DATAOPS_SOLE_ADMIN_WAREHOUSE
DEFAULT_ROLE = DATAOPS_SOLE_ADMIN_ROLE;
USE ROLE SECURITYADMIN;
GRANT ROLE DATAOPS_SOLE_ADMIN_ROLE TO USER DATAOPS_SOLE_ADMIN;
GRANT ROLE ACCOUNTADMIN TO USER DATAOPS_SOLE_ADMIN; -- Needed for creating resource monitors

Using an existing Snowflake account

If you want to use an existing Snowflake account, see Privileges for a Fresh Environment and Privileges to Manage Preexisting Objects.