fbpx
Select Page

Create a Connection

You can connect to your Snowflake data warehouse by creating a connection in Sigma or creating a connection via Snowflake Partner Connect. When creating a connection, you will specify a Snowflake user and role that Sigma will use to connect to the database. You can change which user and role is used to connect at any time. Sigma will have access to all of the tables and schemas that the user has access to.

To restrict what data different Sigma users see, you can set up permissions in Sigma using teams.

Snowflake Partner Connect

If you do not already have a Sigma Organization created, you can use Snowflake Partner Connect to create an organization and connect your Snowflake database with just a few clicks. You must be an ACCTADMIN on Snowflake to use Partner Connect.

IP Whitelisting

If you have IP whitelisting enabled on Snowflake, be sure to whitelist Sigma’s IP addresses. If you don’t whitelist the IPs below, then no data will be visible through your Snowflake connection. How to whitelist IP address on Snowflake

Sigma uses the following IP address to connect to your data:

104.197.169.18

104.197.193.23

Grant Permissions

Sigma can see the databases, schemas and tables granted to the user profile used to connect to Sigma.

If you connect to Sigma utilizing Partner Connect, a new user PC_SIGMA_ROLE is created on your Snowflake instance. By default, this new user has all of the PUBLIC grants. To see additional data in Sigma, you can change the user used to connect to Snowflake or update the permission grants to the PC_SIGMA_ROLE user.

You can grant privileges to Sigma via three different methods: Snowflake UI, SQL editor in the Snowflake Console (Worksheets tab), or SnowSQL. In all methods we’ll be granting USAGE privileges to the required Databases and Schemas and SELECT privileges to the required Tables. If you connected via partner connect, you’ll grant privileges to the PC_SIGMA_ROLE. If you created your Sigma Org outside of Snowflake you’ll want to give privileges to the role you specified during Connection setup in Sigma.

‍Update Grants with SQL

Enter the commands below into the SQL editor in the Worksheets tab for the Database you wish to give Sigma access to.
Replace YOUR_DATABASE_NAME with the name of your database. Replace YOUR_SCHEMA with the name of the schema you’d like to grant permissions to. If you specified a different role, replace PC_SIGMA_ROLE with the role you used to connect.

Enter the following commands into the SQL editor in the Worksheets tab for the Database you wish to give Sigma access to:

use WAREHOUSE PC_SIGMA_WH;
use DATABASE YOUR_DATABASE_NAME;
grant usage on database YOUR_DATABASE_NAME to role PC_SIGMA_ROLE;

Enter the following command into the SQL editor for the schema you wish to give Sigma access to:

grant usage on schema YOUR_SCHEMA to role PC_SIGMA_ROLE;

Enter the following command into the SQL editor to grant access to all tables in the schema to Sigma:

grant select on all tables in schema YOUR_SCHEMA to role PC_SIGMA_ROLE;

Update Grants via SnowSQL

Enter the following SQL commands into SnowSQL:

Replace YOUR_DATABASE_NAME with the name of your database. Replace YOUR_SCHEMA with the name of the schema you’d like to grant permissions to. If you specified a different role, replace PC_SIGMA_ROLE with the role you used to connect.

use WAREHOUSE PC_SIGMA_WH;
use DATABASE YOUR_DATABASE_NAME;
grant usage on database YOUR_DATABASE_NAME to role PC_SIGMA_ROLE;
grant usage on schema YOUR_SCHEMA to role PC_SIGMA_ROLE;
grant select on all tables in schema YOUR_SCHEMA to role PC_SIGMA_ROLE;

Update Grants With the User Interface

When granting permissions through the UI, you need to grant privileges at the Database, Schema and Table level.

Select the Database you would like to grant privileges to. On the right-hand side of the screen there is a button labeled + Grant Privileges. Click that, then grant USAGE to PC_SIGMA_ROLE.

Click into the Database you just granted permissions for. Select “Schema” then click on the specific schema you’d like to grant permissions for. Click +Grant Privileges and then grant USAGE to PC_SIGMA_ROLE.

Click into the schema that you just granted privileges to. Select the table that you would like to be visible in Sigma. Click +Grant Privileges and then grant SELECT to PC_SIGMA_ROLE. You will have to grant access to each table individually.

You can also use SQL to grant access to all of the tables in the schema at once, using the SQL below. Replace YOUR_SCHEMA with the name of the schema you’d like to grant permissions to.

grant select on all tables in schema YOUR_SCHEMA to role PC_SIGMA_ROLE;

We are rewriting the rules of analytics. Sigma empowers domain experts to join the data conversation, answer the toughest questions, and drive insights.