Connect Snowflake
Snowflake is a cloud-based data warehousing platform that helps organizations store, process, and analyze data. The cost of using Snowflake is the aggregated costs of using data transfer, storage, and compute resources. For organizations with heavy data processing and analytics needs, Snowflake costs often account for a significant portion of cloud spending.
DoiT enables you to integrate Snowflake cost and usage data alongside data from other cloud providers, giving you a holistic view of your overall cloud spend and empowering you to optimize cost across the primary cost drivers.
Before you begin
-
You cannot connect your Snowflake accounts if there are network policies in place that restrict network traffic.
-
You can connect one or more Snowflake accounts. To do this, repeat the connection steps for each account you want to connect.
-
You can connect Snowflake accounts with DoiT if you purchase directly or via the marketplace, but not if you sign a Snowflake contract through a Snowflake reseller. Run the following script to check your Snowflake account's compatibility. While reseller purchase is the most common reason for incompatibility, other issues may prevent connection. If the script returns an error or the query returns a false result, the Snowflake account is incompatible, and you will not be able to connect to the DoiT console.
-
Sign in to the Snowflake console using an account that you want to connect.
-
Select Projects and Worksheets and open a new or existing worksheet, depending on your requirements.
-
Copy the following script and paste it in the worksheet.
SELECT
EXISTS(SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY LIMIT 1),
EXISTS(SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_EVENTS_HISTORY LIMIT 1),
EXISTS(SELECT * FROM SNOWFLAKE.ORGANIZATION_USAGE.STAGE_STORAGE_USAGE_HISTORY LIMIT 1),
EXISTS(SELECT * FROM SNOWFLAKE.ORGANIZATION_USAGE.DATABASE_STORAGE_USAGE_HISTORY LIMIT 1),
EXISTS(SELECT * FROM SNOWFLAKE.ORGANIZATION_USAGE.STORAGE_DAILY_HISTORY LIMIT 1),
EXISTS(SELECT * FROM SNOWFLAKE.ORGANIZATION_USAGE.USAGE_IN_CURRENCY_DAILY LIMIT 1),
EXISTS(SELECT * FROM SNOWFLAKE.ORGANIZATION_USAGE.WAREHOUSE_METERING_HISTORY LIMIT 1),
EXISTS(SELECT * FROM SNOWFLAKE.ORGANIZATION_USAGE.RATE_SHEET_DAILY LIMIT 1); -
Select a role. This script can be executed by any role, including PUBLIC, as it does not require any special permissions.
-
Select Run.
-
-
To use Snowflake data in the DoiT console, we create a warehouse named
DOIT_WAREHOUSE
on your behalf. This ensures we don't interfere with your existing warehouses. -
We run queries multiple times daily for about 15 minutes each time. This usually incurs a cost of approximately US$1 per day. To check the exact charge for the
DOIT_WAREHOUSE
, you can run a Cloud Analytics report, using the warehouse name as the filter. SeeDOIT_WAREHOUSE
cost for an example.
Follow the step-by-step instructions below or check out the ▶️ interactive demo for a visual walkthrough.
Required permissions
To connect your Snowflake accounts with DoiT:
-
Your DoiT account must have the Billing Profiles Admin permission.
-
Your Snowflake accounts must have an active Snowflake subscription with administrator permissions.
Connect your Snowflake accounts
To help you connect your Snowflake accounts, the DoiT console provides a step-by-step wizard, which you can launch in multiple ways:
-
On the Home page:
-
Under Welcome to the DoiT Console, select Get started in the Connect your Snowflake account pane; or
-
Scroll down to find the Connect your cloud section, and then select Connect your Snowflake account.
-
-
Navigate to the Assets page. Choose Snowflake in the left-hand menu and then select Connect your account.
-
Navigate to the Snowflake Lens dashboard and then select Connect your Snowflake account.
The wizard contains three steps:
Requirements
The first step contains explanatory information about a script you'll need to run. The script creates the following resources in your account:
-
A DoiT role with the following Snowflake permissions:
ORGANIZATION_USAGE_VIEWER
,GOVERNANCE_VIEWER
,ORGANIZATION_BILLING_VIEWER
, andUSAGE_VIEWER
. See Snowflake database roles for more information. -
A user with the DoiT role above.
-
A warehouse named
DOIT_WAREHOUSE
.
After you read through the requirements, select Next to set up the connection.
Set up connection
The second step guides you to set up the connection between your Snowflake account and the DoiT console:
-
Sign in to the Snowflake console using an account with administrator permissions.
-
Select Projects and Worksheets, and open a worksheet.
-
Copy the script from the step-by-step wizard, and paste it in the Snowflake worksheet.
-
At the top of the worksheet, select a warehouse to run the script.
-
Select a role to run the worksheet as, and expand the Run button to select Run All.
-
Back to the wizard in the DoiT console, enter your Snowflake account ID and organization ID, which you can find in the URL:
https://app.snowflake.com/ORGANIZATION_ID/ACCOUNT_ID
.See also Finding the organization and account name for an account.
Test your connection
The last step is to test your Snowflake connection by selecting Test connection. The test usually takes a few seconds.
What's next
-
After you successfully connected your Snowflake accounts, we start importing your billing data. The process can take up to one hour. You'll receive an email when the data is available for Cloud Analytics and other DoiT features.
-
Once your Snowflake data is in the DoiT platform, you'll receive notifications when we identify cost anomalies in your Snowflake spend.
-
To monitor your Snowflake data out of the box, check out the Snowflake Lens.
-
Learn more about how to work with Snowflake data.
▶️ Interactive demo
Try out our interactive demo for a hands-on walk-through experience.
If the demo doesn't display properly, try expanding your browser window or opening the demo in a new tab.