Snowflake Usage Templates

Sigma offers templates to create presentation-ready workbooks that display your Snowflake account usage data. These workbooks can be used to quickly dive into understanding and sharing your organization’s Snowflake usage.

Summary of Content

Requirements
Usage Template Types
Accessing Snowflake Account Usage Data in Sigma
      Setting a Role on your Connection
      Granting a Role permissions in Snowflake
Create a New Snowflake Usage Workbook
Troubleshooting Q&A
Related Resources

Requirements

  • To explore an existing template or create a new workbook based on a template, you must:
    • be assigned an Explorer, Creator or Admin account type
    • have Can Use access to the template
  • Your connection must have access to the warehouse’s account usage data. Configuring this requires an Admin account type and the appropriate Snowflake permissions. Learn more

Usage Template Types

  • Compute Cost: tracks cost by warehouse over time
  • User Adoption: tracks how users are using warehouses and databases
  • Performance Monitoring: tracks database, warehouse, and individual query performance
  • Storage Cost: tracks storage cost by database and over time.
  • Snowflake Cost (Reader Accounts): tracks compute and cloud service costs specific to Reader accounts.

Accessing Snowflake Account Usage Data in Sigma

Before you can take advantage of these templates, you will need to grant the Role used for your Sigma connection to Snowflake access to your warehouse’s ACCOUNT_USAGE schema.

Setting a Role on your Connection

  1. Open your Sigma Admin Portal.
  2. Select the Connections page from the left hand panel.
  3. Select your connection from the connection list.
  4. The current Role will be listed under Connection Credentials.
    If you would like to change this role, click the blue Edit button under Connection Details.
  5. Enter the new Role.
  6. Click Save.

Granting a Role permissions in Snowflake

To learn how you can grant a Snowflake role permission to your warehouse’s ACCOUNT_USAGE schema, visit Snowflake’s Account Usage documentation.

Create a New Snowflake Usage Workbook

Prerequisite: Your Snowflake Account Usage data must be available in Sigma. Learn more

To inject your own data into a SIGMA TEMPLATE: 

  1. Open your Templates gallery page.
    You can access this page from:
    • the left-side navigation panel on your home page, or
    • the quick navigation menu (Screen_Shot_2021-11-18_at_11.08.00_AM.png), located in the top left corner of any document page.
  2. Click the template you would like to use.
    This opens the templated workbook.
  3. If the workbook is built on sample data, a popup will appear at the top of the page.
    Click Swap now.
    swap_now_button.png
    This opens the Swap Data Sources page.
    sourc_swap_page.png
  4. Sigma will attempt to automatically match your data with the template's expected data. 
    However, you can override this, or you may need to manually select a source if a cannot be found by Sigma.
    [optional] To replace a matched source, click the edit(edit_pencil_icon.png) button next to the source under  REPLACE WITH. Then select a new source from the modal.
    Replace_matched_source_pencil_button.png
  5. If the template requires additional sources, check each sources match from the left most panel, ALL SOURCES IN USE.
  6. When ready, click Swap.

Now what? Explore the workbook to confirm that your data looks correct. To create an editable and publishable workbook from the template, click Save As in the template’s header.

 

Troubleshooting Q&A

Question: My Snowflake Usage workbooks are slow to load and/or time out. Why? What can I do to improve their performance?

Answer: Slow load times and query timeouts typically occur when the warehouse is struggling to respond to a request. This is often due to warehouse size. In response to slow load times, Sigma will time out a request if the query is still running after 2 minutes.
To check on your query run times and view timeouts, visit your workbook's query display modal.
There are a couple ways you can improve your workbook performance:

[Option 1] The quickest way to speed up your workbook's load time is to filter the date to a smaller date range. ACCOUNT_USAGE tables are partitioned by time, so filtering by the date may improve performance.
Screen_Shot_2020-07-01_at_3.18.02_PM.png

[Option 2] To improve your usage workbook's performance when working with large or low-performing data sets, we recommend increasing your Snowflake warehouse size to medium or larger. You may also want to create a new connection in Sigma specifically for using Snowflake Usage Templated Workbooks.

Related Resources

Get Started with Templates
Create and Edit Templates
Connect to Snowflake