Summary: Instructions about granting Snowflake access, including creating a user and assigning roles.
You can set up access to Snowflake in a few simple steps.
First, log in to your Snowflake account and open up an SQL worksheet, or connect to Snowflake using your SQL console of choice.
Snowflake is case-sensitive, and most objects are in ALL UPPERCASE. The username and password can be any case. The domain name is case-sensitive.
Then, run the following SQL command block (note that lines 2 and 3 are optional) replacing the value inside the brackets (<>) with your actual value:
USE ROLE ACCOUNTADMIN; CREATE DATABASE "<DATABASE>"; CREATE SCHEMA "<DATABASE>"."<SCHEMA>"; CREATE ROLE "<ALOOMA_ROLE>"; GRANT USAGE ON DATABASE "<DATABASE>" TO ROLE "<ALOOMA_ROLE>"; GRANT CREATE SCHEMA ON DATABASE "<DATABASE>" TO ROLE "<ALOOMA_ROLE>"; GRANT ALL ON SCHEMA "<DATABASE>"."<SCHEMA>" TO ROLE "<ALOOMA_ROLE>"; CREATE USER <ALOOMA> PASSWORD='<PASSWORD>' DEFAULT_ROLE = "<ALOOMA_ROLE>"; GRANT ROLE "<ALOOMA_ROLE>" TO USER <ALOOMA>; GRANT ALL ON WAREHOUSE "<WAREHOUSE_NAME>" TO "<ALOOMA_ROLE>";
The code block above will:
Ensure that the role for the session is set to ACCOUNTADMIN in order to grant privileges.
[Optional] Create a new database for Alooma.
[Optional] Create a new schema for Alooma.
Create the role that will be used by the Alooma user.
Grant database privileges to the role (regardless of whether a new database was created in step 2).
Grant schema privileges to the role (regardless of whether a new schema was created in step 3).
Create the user for Alooma's Snowflake connection.
Grant ALOOMA_ROLE privileges to the alooma user.
Grant ALOOMA_ROLE privileges over the selected warehouse.
That's it, you're done configuring access, time to connect to Snowflake.
If you need to whitelist Alooma's IP addresses within Snowflake, here's how.
If you need support or prefer to use a pre-existing user, role, or other option, contact us and we'll be happy to help you get set up.