Skip to main content
IP RESTRICTIONSMake sure to allow traffic from one of the Paradime IPs in your firewall depending on the data location selected.See also: Paradime IP addresses.

1. Snowflake setup guide

With the Key Pair auth method, you don’t have to type these scripts. The Radar connection form generates the key pair and shows one setup script with your company’s values filled in. It covers the role, user, warehouse, storage integration, database, file format, grants, and the key pair. See Step 2: Enter the required credentials. Then run Check the Paradime user and Ensure your account has ORGADMIN access. For Username & Password, run the steps below.
The Radar connection form has no role or warehouse field. Paradime signs in as paradime_cost_user and uses that user’s default role and default warehouse. If the default role isn’t paradime_cost_role, the connection still saves, but Snowflake runs every Radar query as PUBLIC and no cost data arrives. Create a Snowflake role and user sets both defaults, and Check the Paradime user checks them.

Create a Snowflake role and user

The rsa_public_key line is for a key pair you generate yourself: replace <your_public_key_here> with its public key, without the BEGIN and END lines, then upload its private key in the connection form. See Snowflake’s guide to generating an encrypted or unencrypted key pair. To let Paradime generate the key pair, or to use Username & Password, leave the rsa_public_key line out.
If you use an existing user instead of paradime_cost_user, run the grant role and alter user statements for that user. create user if not exists changes nothing on a user that already exists.

Create a Snowflake warehouse

Create a new database and schema for Paradime

Create S3 integration

Before running this command, you will need to update STORAGE_AWS_ROLE_ARN and STORAGE_ALLOWED_LOCATIONS with your own region and company token.You can find the region and company token in the Paradime workspace settings page. company-and-workspace-token.md
If you have set PREVENT_UNLOAD_TO_INLINE_URL to true, you can optionally use a named stage. To set this up run the below script.

Before running this command, you will need to update URL with your own region and company token. You can find the region and company token in the Paradime workspace settings page. company-and-workspace-token.md

Create a new Snowflake file format

Grant access to Snowflake metadata to the Paradime user

Enable the Paradime user to manage and monitor Snowflake Warehouses

Check the Paradime user

If DEFAULT_ROLE is empty or shows a different role, run the alter user statement from Create a Snowflake role and user again. If PARADIME_COST_ROLE isn’t in the grants, run grant role paradime_cost_role to user paradime_cost_user;.

Ensure your account has ORGADMIN access

Paradime relies on views from the snowflake.organization_usage such as the snowflake.organization_usage.rate_sheet_daily view is used to retrieve your daily rate for each Snowflake service (example the cost per credit for compute resources and cost per terabyte for storage). To verify if these views are populated in your account, please execute the following SQL statement:
If records are returned, you’re all set 🙌
If the SQL statement returns no records, it likely means that the ORGADMIN role is not enabled for the account. To enable it, follow these steps:
  1. Log into a Snowflake account within your organization that has the ORGADMIN role enabled (at least one account should have this role).
  2. Navigate to the sidebar and click on “Admin” and then “Accounts”.
  3. Locate the account you want to connect to Paradime enable the ORGADMIN role for that account.
💡 It can take up to 1 day for these views become populated with data after running this statement

Purchased your Snowflake credits through a reseller?

If you purchased your Snowflake contract or credits through a reseller, such as the AWS Marketplace, you will not have access to the organization_usage views even after executing the steps mentioned above to enable the ORGADMIN role.

Share a copy of your latest Snowflake invoice with the Paradime team (via chat or by emailing support@paradime.io so that we can manually input the applicable rates for your account.

Full script here 👇

lineNumbers

2. dbt™️ project setup guide

Create a macro to manage query comments

To enable Paradime to enrich your Snowflake queries with additional metadata you will need to create a new dbt™️ macro called get_query_comment.sql in the macros folder of your project.
get_query_comment.sql

Update your dbt_project.yml file

This step ensures that with each dbt™️ run, the query comment is appended to the query running in Snowflake.
dbt_project.yml

3. Configure the cost connection in Paradime

Step 1: Add a Snowflake cost connection

  1. Open Workspace Settings from the top menu bar of the Paradime interface.
  2. Click Environments in the left sidebar, then Radar.
  3. Click Add connection.
  4. Select Snowflake as the connection type.
To read more than one Snowflake account, run the setup on this page in each account, then add one cost connection for each account. Each account can be connected once in your company. See Connect several accounts or projects.

Step 2: Enter the required credentials

After selecting Snowflake, provide the following details:
  • Connection name: a name for this connection, for example the team or region the account belongs to. If you leave it empty, Paradime uses the account.
  • Account: your Snowflake account identifier.
  • Database: PARADIME_COST_ANALYTICS
  • Auth Method: Key Pair or Username & Password.
If using the Key Pair auth method:
  1. In Username, keep PARADIME_COST_USER, or enter the user you set up.
  2. In the Key pair field, click Generate key pair. To use your own key pair, click Upload private key (.pem) and choose the private key that matches the public key you set on the user in Create a Snowflake role and user. If the key is encrypted, enter its passphrase.
  3. Under Add it to Snowflake, copy the setup script. It creates the role, user, warehouse, storage integration, database, schema, and file format, grants the access Radar needs, and ends with a statement that adds the public key to the user. Run it in Snowflake as an account admin. Every statement but the last can run again safely, so you can also run it after the steps on this page. If you uploaded a private key whose public key the user already has, skip this step.
  4. Click I’ve added the key.
The private key never reaches your browser. See Key-pair authentication.
The connection saves when Paradime can sign in and read the storage integration. This doesn’t check the user’s default role. If Radar shows no cost data after you save the connection, run the checks in Check the Paradime user.