- Create a Snowflake user and role that Confidence can use to read and write data to your warehouse.
- Grant the role permissions to use a Snowflake warehouse.
- Set up a schema and/or a database to store assignment data coming out of Confidence Flags.
- Set up a schema and/or a database to store exposure calculation data.
- Generate a key pair in confidence, and assign the public key to your Snowflake user.
- Configure a Data Warehouse connection so that Confidence can compute metrics using Snowflake.
- Configure a Flag Applied connector so that Confidence can store assignment data in Snowflake.
If you already followed the setup guide on the Admin page, your
setup is already complete. You can skip directly to what’s next.
Before You Begin
- This tutorial assumes you have a Confidence account.
- This tutorial assumes you have a Snowflake account ready, and have the permissions needed to create users, roles, databases and schemas for that account. You should also have a Snowflake warehouse available to run Confidence queries.
Step 1. Create a Snowflake User and/or Role
As a first step, you create a Snowflake user, and grant a role to that user. You can either use a pre-existing role that you already have, or create a new role just for the Confidence integration.Step 2. Give the Role Permissions to Run Queries in a Warehouse
Confidence needs to run queries to calculate metrics, so for this you need to grant the role you created permissions to use the warehouse. You can either create a new warehouse only for Confidence, or use an existing warehouse.Step 3. Create Database and Schemas for Assignment Data
Confidence needs two schemas in Snowflake: one to store assignment data and one to store internal data for the exposure calculations. In the following example, you create a separate database to hold Confidence data. To create the schemas, follow these steps (or change according to your organization guidelines):Step 4. Create Schemas for Exposure Calculations
Repeat the preceding steps to create a second schema. For example,EXPOSURE.
Step 5. Generate a Key in Confidence, and Assign the Public Key to Your Snowflake User
- Go to the Confidence App.
- On the bottom of the left sidebar, select Admin > Connections > Metrics Data Warehouse.
- Select Snowflake.
- Click on the “Crypto key” combo box, and generate a new key that you can call whatever you want. Then click the “Copy public key” button to the right of the combo box to copy the public key to your clipboard.
-
Run the following SQL command in Snowflake to let Confidence authenticate as the user you created using the public key:
Step 6. Configure a Metrics Data Warehouse
For Confidence to be able to compute metrics using Snowflake, you need to set up the connection between Confidence and Snowflake. To do so, follow these steps:- Go to the Confidence App.
- On the bottom of the left sidebar, select Admin > Connections > Metrics Data Warehouse.
- Select Snowflake.
- Select the Crypto key you created in the earlier step, and complete the rest of the configuration form. After configuring the account identifier, user, and the crypto key, Confidence reads the available roles, databases and schemas from Snowflake and populates the remaining options.
- Click SAVE.
Step 7. Configure a Flag Applied Connector
For Confidence to be able to store assignment data in Snowflake, you need to set up the connection between Confidence and Snowflake. To do so, follow these steps:- Go to the Confidence App.
- On the bottom of the left sidebar, select Admin > Connections > Flag Applied.
- Click Create
- Select Snowflake as destination.
- Select the Crypto key you created in the earlier step, and complete the rest of the configuration form. After configuring the account identifier, user, and the crypto key, Confidence reads the available roles, databases and schemas from Snowflake and populate the remaining options.
- Click Save.
Step 8. Configure an Assignment Table
For Confidence to be able to use the stored assignment table, you need to set up an assignment that reads from the Snowflake table. You first need to create an entity, which represents the thing you’re experimenting on, like your users. To do so, follow these steps:
Now that you have an entity, you can create an assignment table that reads from
the Snowflake table. To do so, follow these steps:
Navigate to the Snowflake connection
On the bottom of the left sidebar, select Admin > Connections > Flag Applied and select the Snowflake connection you created.

