Skip to main content

Connecting a SnowFlake Account to Uniskai

Uniskai integrates Snowflake cost and usage data with your existing cloud providers. Connect Snowflake via Third-party connections in Account Manager, then view its costs within the Cloudcosts modules alongside AWS, Azure, GCP, and OCI. To connect, retrieve your Snowflake account identifier, add the account in Uniskai, and run the generated setup script.

How it works

Object

Where it is created

Purpose

Account identifier

Snowflake, returned by a query

Identifies your Snowflake organization and account to Uniskai.

Key pair

Uniskai, when you generate the setup script

Authenticates Uniskai to Snowflake. The private key stays in Uniskai's secrets store; only the public key is embedded in the script.

UNISKAI_ROLE

Snowflake, created by the setup script

Holds the read privileges on billing and usage data.

UNISKAI_WH

Snowflake, created by the setup script

X-Small warehouse used for the daily read. Auto-suspends after 30 seconds.

UNISKAI_USER

Snowflake, created by the setup script

Service user Uniskai authenticates as. Has no password and cannot log in interactively.

Snowflake account

Uniskai, Account manager, Third-party connections

The connection record in Uniskai. Stores the account name and identifier.

Prerequisites

  • A Snowflake account with the ACCOUNTADMIN role, or a colleague who can run a script as ACCOUNTADMIN.

  • Access to the Snowflake web interface.

  • A Uniskai user with permission to add accounts.

How to connect Snowflake:

1. Get your account identifier in Snowflake

  • In Snowflake, select the + button in the left sidebar and choose SQL File.

  • Paste the following query into the file:

    SELECT CURRENT_ORGANIZATION_NAME() || '-' || CURRENT_ACCOUNT_NAME() AS ACCOUNT_IDENTIFIER;
  • Select the Run button.

  • Copy the value from the Results panel, for example MYORG-MYACCOUNT.

    The same query is shown in the Uniskai connection form, so you can copy it from there instead. Copy the returned value exactly as it appears, including the hyphen — a value assembled manually from your organization and account names is not accepted.

2. Add the Snowflake account in Uniskai

  • In Uniskai, open Account manager and select Add New Account.

  • Under Third-party connections, select the Snowflake card.

  • In Account name, enter a name that identifies this connection, for example Snowflake Production.

  • In Account identifier, paste the value returned by the query.

  • Select Generate setup script.

  • Copy the generated script using the copy icon in the top-right corner of the script block.

3. Run the setup script in Snowflake

  • In Snowflake, create a new SQL file and paste the script into it.

  • Select the arrow next to the Run button and choose Run all.

  • Confirm that every statement completed successfully.

4. Complete the connection in Uniskai

  • Return to the Uniskai connection form.

  • Select Connect account.

Do not select Regenerate setup script at this point. Regenerating creates a new key pair that no longer matches the public key stored on your Snowflake service user. If you have already regenerated, run the new script in Snowflake before connecting.

View Snowflake costs

Costs for the current month appear in Costs analysis right after the account is connected. Historical data is collected separately and can take up to a day to show up in full.

  • In the left menu, open Cloudcosts, then Costs analysis.

  • Set Time range to the period you want to review, for example Current month.

  • In Provider, select Snowflake.

  • Clear any exclusion filters that would hide the data. Usage Account, Service Category, and Service Name may be set to is not with values pre-selected — remove those values.

  • Select Apply filters.
    If the data does not look up to date, select Refresh to reload it.

Create a chart of Snowflake costs (optional)

You can build a custom chart to visualize Snowflake spend:

  • Create a new chart on the billing.focus_distributed dataset.

  • Set the metric to SUM(BilledCost).

  • Add the filter ServiceProviderName IN ('Snowflake'). (to confirm: exact provider value stored for Snowflake)

  • To break the cost down by service, set the X-axis (dimension) to ServiceName.

The chart then shows Snowflake billed cost and can be added to a dashboard.

Results

The connected account appears in Account manager under the Snowflake tab, with Access Read only, Connection Key pair, and Status OK. Use Details to view the connection, or the chart icon in Actions to open a cost chart. (to confirm: exact column values shown for a Snowflake connection)

Snowflake data is available in Costs analysis:

  • Cost by Provider includes Snowflake.

  • Top Services by Cost includes your Snowflake services.

  • Monthly Total Spend shows Snowflake spend over the selected period.

  • Provider is available as a filter value across Cloudcosts modules.

Key notes / limitations

  • The setup script must be run with Run all. Running it statement by statement leaves the public key unattached to the service user, and the connection fails.

  • Do not regenerate the script after running it. Each generated script contains a new key pair, so the keys no longer match and the connection fails.

  • One connection per Snowflake account. Connecting the same account a second time replaces the credentials of the first connection, and the earlier connection stops working.

  • The connection is read-only and can be cancelled at any time. Objects created by the script remain in your Snowflake account after removal.

Did this answer your question?