Skip to main content

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/settings/connections/new

Your Account

  • Login to Snowflake
  • Navigate to Admin > Accounts

Note your Account in the link hovered over https://<YOUR_ACCOUNT>.- snowflakecomputing.com which will be of the form Organization ID - Account Id

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>