Learn how to add Atlassian Analytics to a site and understand what you need to query data and create charts.
To connect your Snowflake database to Atlassian Analytics, you’ll need to do the following:
Allow Atlassian IP addresses for outbound connections.
Create a read-only user.
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:
Account level: Applies to all users unless a user-level policy overrides the policy. Refer to the Snowflake documentation for how to modify account-level network policies.
User level: Only applies to the users that the policy is assigned and will override account-level policies. Refer to the Snowflake documentation for how to modify user-level network policies.
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:
Open your Snowflake instance.
Select your account name in the top left.
Select Switch role > ACCOUNTADMIN.
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.
Open your Snowflake Worksheets page and choose your worksheet to run the following statements in the console.
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;
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.
To grant usage on a warehouse, run the following statement: GRANT USAGE ON WAREHOUSE <warehouse_name> TO ROLE <role_name>;
To grant usage on a database, run the following statement: GRANT USAGE ON DATABASE <database_name> TO ROLE <role_name>;
To grant usage on a schema, run the following statements for each schema you’d like to grant Atlassian Analytics access to.
To grant usage on a schema, run the following statement: GRANT USAGE ON SCHEMA <schema_name> TO ROLE <role_name>;
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>;
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.
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:
Select Data from the global navigation.
Select Add data source > Snowflake.
Fill out the required fields of the connection form.
Account identifier - The first part of your Snowflake URL: account-name.region.snowflakecomputing.com
Account user - The username of the read-only user you created.
User password - The password of the read-only user.
Database name - The database you granted access to.
Warehouse name - The warehouse you granted access to.
Schemas - Select the schemas you granted access to.