- Create a new Snowflake database for all Datacoral created and owned tables. Datacoral will create separate schemas for each Datacoral connector and the tables corresponding to loadunits or materialized views within each schema.
- Create a new Snowflake warehouse for compute use by Datacoral. Size this small and expect it to grow as the data and materialized views grow. This isolates the Datacoral owned pipelines from the rest of the work loads.
- Create a new Role that will be used by the Snowflake User used by Datacoral
- Grant ownership of warehouse and database to the Role
- Create a new Snowflake user and assign it a Snowflake Role that gives the user access to the database and warehouse created in Step 1 & 2.
Run the following commands to setup the Datacoral user in Snowflake and provide the right permissions.
USE ROLE "ACCOUNTADMIN"; CREATE DATABASE DATACORAL_DB COMMENT = 'DATACORAL_OWNED'; CREATE WAREHOUSE DATACORAL_WH WITH WAREHOUSE_SIZE = XSMALL AUTO_RESUME = TRUE AUTO_SUSPEND = 60 COMMENT = 'DATACORAL_OWNED'; CREATE ROLE DATACORAL_ROLE COMMENT='DATACORAL_OWNED'; GRANT OWNERSHIP ON DATABASE DATACORAL_DB TO DATACORAL_ROLE; GRANT OWNERSHIP ON WAREHOUSE DATACORAL_WH TO DATACORAL_ROLE; CREATE USER DATACORAL_USER PASSWORD = '<VALUE>' LOGIN_NAME = '<UNIQUE_NAME>' DEFAULT_WAREHOUSE = DATACORAL_WH DEFAULT_NAMESPACE = DATACORAL_DB DEFAULT_ROLE=DATACORAL_ROLE COMMENT= 'DATACORAL_OWNED'; GRANT ROLE DATACORAL_ROLE TO USER DATACORAL_USER; DESCRIBE USER DATACORAL_USER;
Grant the newly created role to the Snowflake user
Check the new created user properties to make sure defaults (database, warehouse, role) are correctly set.