Snowflake
Connecting to Snowflake
Create Snowflake User
- Login to Snowflake
- Create a new Worksheet
- Enter, fill in and run following commands to create a new user: omni_user and role: omni_role with permission to query.
use role ACCOUNTADMIN;
create role if not exists omni_role;
create user if not exists omni_user
password = '<YOUR_PASSWORD>';
grant role omni_role to user omni_user;
alter user omni_user
set default_role = omni_role
default_warehouse = '<warehouse>';
-- grant read only database access (repeat for all database/schemas)
grant usage, monitor on database <database> to role omni_role;
grant usage, monitor on schema <database>.<schema> to role omni_role;
grant usage, monitor on warehouse <warehouse> to role omni_role;
-- alternatively can grant read only database access across all schemas
grant usage, monitor on database <database> to role omni_role;
grant usage, monitor on ALL SCHEMAS IN DATABASE <database> to role omni_role;
grant usage, monitor on FUTURE SCHEMAS IN DATABASE <database> to role omni_role;
grant usage, monitor on warehouse <warehouse> to role omni_role;
-- grant access to all tables in the schema to omni_role
grant select on all tables in schema <database>.<schema> to role omni_role;
grant select on future tables in schema <database>.<schema> to role omni_role;
-- grant access to all views in the schema to omni_role
grant select on all views in schema <database>.<schema> to role omni_role;
grant select on future views in schema <database>.<schema> to role omni_role;
Create Snowflake Connection
Navigate to Settings > Connections select Add Connection Connection
https://yourinstance.omniapp.com/connections/new
Finding your Account Indentifier
In Snowflake, your account identifier is your account locator, qualified by platform and region if your Snowflake is not hosted on AWS in US West (Oregon) (i.e. may be account_name
or account_name.us-central1.gcp
). More information in the snowflake docs can be found here.
To find your locator, region, and platform, click on your user in the bottom left of the snowflake console and hover over account.
note
Snowflake connection parameters can be case sensitve, and are often capitalized. If you see errors on connection, confirm your connection parameters match your Snowflake environment exactly.
- Name:
<PREFERRED_OMNI_CONNECTION_NAME>
- Account:
YOUR_ACCOUNT_ID>
(see instructions above) - Username:
omni_user
(if you created a user above) - Password:
<YOUR_PASSWORD>
- Warehouse:
<YOUR_WAREHOUSE>
- Default Schema:
<YOUR_SCHEMA>