• Products
  • Documentation
  • Resources

Connect to Snowflake

To connect your Snowflake database to Atlassian Analytics, you’ll need to do the following:

  1. Allow Atlassian IP addresses for outbound connections.

  2. Create a read-only user.

  3. Complete the connection form in Atlassian Analytics.

Set Snowflake warehouses to auto-suspend

As a prerequisite, make sure your Snowflake warehouses are set to AUTO-SUSPEND. Atlassian Analytics will automatically resume a suspended warehouse prior to schema refresh. Atlassian Analytics will not resume a suspended warehouse to run a query. Refer to Snowflake’s documentation for more information about suspended warehouses.

Allow Atlassian IP addresses

Before you connect your Snowflake database to Atlassian Analytics, you’ll need to allow Atlassian IP addresses for outbound connections. Get the list of Atlassian IP addresses for outbound connections here.

This ensures that Atlassian Analytics can successfully send your queries to your database.

Snowflake instances are default open to every IP address, so no action is required. But if you have an existing Snowflake network policy, ensure that they allow connections from the Atlassian IP addresses.

There are two types of network policies you can set up in your Snowflake instance:

Create a Snowflake read-only user

Ensure you have the required admin role in Snowflake

You need the ACCOUNTADMIN role in Snowflake to create a new role and new user.

To change your role:

  1. Open your Snowflake instance.

  2. Select your account name in the top left.

  3. Select Switch role > ACCOUNTADMIN.

Setting Snowflake role to ACCOUNTADMIN from profile menu

Create a read-only role

To ensure the security of your data, we recommend assigning a read-only role to the user connecting to Atlassian Analytics. This will ensure that the user has the minimum privileges required to access the necessary data. You must grant this role usage privileges on the warehouse, database, and schema and the SELECT privilege on all tables you want to access in Atlassian Analytics.

  1. Open your Snowflake Worksheets page and choose your worksheet to run the following statements in the console.

  2. Create the role by running the following statement, which will create a role called ATLASSIAN_ANALYTICS_READ_ONLY: CREATE ROLE IF NOT EXISTS ATLASSIAN_ANALYTICS_READ_ONLY;

  3. Grant privileges by running each GRANT statement sequentially to grant the appropriate privileges to the read-only role. Replace <role_name> with the role name you used in the previous step, and do not include the angle brackets (<>) when you change the values in these statements.

    1. To grant usage on a warehouse, run the following statement: GRANT USAGE ON WAREHOUSE <warehouse_name> TO ROLE <role_name>;

    2. To grant usage on a database, run the following statement: GRANT USAGE ON DATABASE <database_name> TO ROLE <role_name>;

    3. To grant usage on a schema, run the following statements for each schema you’d like to grant Atlassian Analytics access to.

      1. To grant usage on a schema, run the following statement: GRANT USAGE ON SCHEMA <schema_name> TO ROLE <role_name>;

      2. To grant access to all tables (first statement) or specific tables (second statement) in a schema:

        • GRANT SELECT ON ALL TABLES IN SCHEMA <schema_name> TO ROLE <role_name>;

        • GRANT SELECT ON TABLE <database_name>.<schema_name>.<table_name> TO ROLE <role_name>;

Using the Snowflake console to run a CREATE ROLE statement

Create a read-only user

After you create the read-only role, we recommend you create a new user that will only be used to connect to Atlassian Analytics and grant this user the read-only role. The below statements create the user and give the user the read-only role.

Do not include the angle brackets (<>) when you change the values in the statements.

The password must have at least eight characters and include at least one number and symbol.

1 2 CREATE USER IF NOT EXISTS <username> PASSWORD = '<password>' MUST_CHANGE_PASSWORD = FALSE DEFAULT_ROLE = READ_ONLY; GRANT ROLE READ_ONLY TO USER <username>;

Add Snowflake to Atlassian Analytics

After allowing our outbound IP addresses and creating a read-only user, you can complete the connection form in Atlassian Analytics to add your Snowflake database.

All connection details are case-sensitive. Snowflake stores object names in uppercase unless you wrap the names in double quotes ("") when you create the object. This applies to warehouse names, database names, and schema names.

To add Snowflake to Atlassian Analytics:

  1. Select Data from the global navigation.

  2. Select Add data source > Snowflake.

  3. Fill out the required fields of the connection form.

    1. Account identifier - The first part of your Snowflake URL: account-name.region.snowflakecomputing.com

    2. Account user - The username of the read-only user you created.

    3. User password - The password of the read-only user.

    4. Database name - The database you granted access to.

    5. Warehouse name - The warehouse you granted access to.

    6. Schemas - Select the schemas you granted access to.

  4. Select Connect.

Additional Help