Snowflake Usage Templates

Sigma's Snowflake Usage Templates provide an accurate, in-depth and prebuilt analysis that allows you to understand your company's Snowflake consumption and performance. These templates combine descriptive and prescriptive analytics, providing a foundation to launch ad hoc, unrestricted analysis into Snowflake usage data.

Summary of Content

Requirements
Available Snowflake Usage Templates
Access Snowflake Usage Data in Sigma
Create a New Workbook from a Snowflake Usage Template
Troubleshooting Q & A
FAQ
Related Resources

Requirements

To explore the Snowflake usage templates on your company's Snowflake usage data:

  • Have an Explorer, Creator or Admin account type in Sigma
  • Your connection must have access to the proper Snowflake usage data schema for each template (outlined below). Configuring this requires a Sigma Admin account type and the appropriate Snowflake permissions.

Note: You can explore the templates on sample Snowflake usage data by simply launching the template, regardless of your connection's Snowflake access.

Available Snowflake Usage Templates

  • Cost Monitoring: track contract consumption, compute cost and storage cost across your entire Snowflake organization
  • Performance Monitoring: monitor query performance, warehouse activity, and more for a specific Snowflake account
  • User Activity: track how Snowflake users use warehouses and databases in a specific Snowflake account
  • Reader Cost: monitor the compute cost for the reader accounts of a specific Snowflake account

Access Snowflake Usage Data in Sigma

To use any of the Snowflake Usage Templates, you will need to grant the Role used for your Sigma connection to Snowflake access to the proper schema. All the templates don't run on the same schema.

The data and privileges needed for each template are listed here:

  • Cost Monitoring: SELECT access on the ORGANIZATION_USAGE schema (this schema is available only your master Snowflake account).
  • Performance Monitoring: SELECT access on the ACCOUNT_USAGE schema
  • User Activity: SELECT access on the ACCOUNT_USAGE schema
  • Reader Cost: SELECT access on the READER_ACCOUNT_USAGE schema

Change a Role on a 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 is listed under Connection Credentials.
    To change the role, click the blue Edit button under Connection Details.
  5. Enter the new Role.
  6. Click Save.

Grant privileges to a Role in Snowflake

To learn how to grant a Snowflake role permission to a given schema, see Snowflake’s Account Usage documentation.

Create a New Workbook from a Snowflake Usage Template 

Follow the steps below to create a workbook from a Snowflake Usage Template that displays your company's Snowflake usage data.

  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 (company apps), located in the top left corner of any document page.
  2. Click the Snowflake Usage Template you would like to use. This launches an exploration based on the template.
    company apps

  3. This exploration initially shows sample Snowflake usage data. Click Swap Now to replace this sample data with your own Snowflake usage data. You can also explore the workbook with sample data by clicking Dismiss.

    company apps

  4. Click Swap Now to open the Swap Data Sources page. Sigma searches your connection(s) for tables that match the structure of the current sources. Because Snowflake usage tables are consistent in structure, there should be a fully compatible match. 

    company apps

    If no match is found, you can manually locate the correct table.

  5. To replace a matched source, click the Edit(company apps) button next to the source under REPLACE WITH. Then select a new table from the modal.

    company apps

  6. When you locate the correct tables to swap into the exploration, click Swap. The exploration will refresh and display your data.
  7. Explore the workbook to confirm that your data is correct. To create an editable and publishable workbook from the template, click Save As in the exploration 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 complex queries being run on large tables on busy warehouses. 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. Snowflake Organization and Account Usage tables are partitioned by time, so filtering by the date may improve performance.

Question: I receive errors and/or null data after performing source swapping. Why?

Answer: The most likely causes are: the table(s) you swapped to are not all from the same connection, are not from the correct schema or are empty.

[Option 1] To check if the tables are from the same connection or if they are from the correct schema, open the Swap Data Sources modal again and investigate the connections for each table.

company apps

[Option 2] Snowflake sometimes provides an ORGANIZATION_USAGE schema to non-master Snowflake accounts, but leaves it empty. If you are trying to launch the Cost Monitoring template, the Source Swapping feature might find this empty schema in the connection to the non-master account. Change the source to use the ORGANIZATION_USAGE schema in the master account.

FAQ

Question: What is a Snowflake organization vs account?

Answer: An organization is the parent-most Snowflake object, and is effectively a collection of Snowflake accounts. It may contain 1 or many accounts under its umbrella, one of which is the master account. This master account has the organization_usage schema provided to it in the SNOWFLAKE database (all other, non-master accounts, do not have access to this schema by default).

An account is a collection of warehouses, databases, users, roles, etc. Each account is a child of an organization, and will have its own account_usage and reader_account_usage schema. These schema contain data pertaining only to this account, and not to any other accounts in the same organization.

Question: What is the scope of each template?

Answer:

  • Cost Monitoring: covers compute and storage cost across all accounts in the organization.
  • Performance Monitoring: monitors queries in an individual Snowflake account
  • User Activity: monitors users in an individual Snowflake account
  • Reader Cost: monitors compute cost for reader accounts of an individual Snowflake account

Question: Once launched and repointed to my data, will my Snowflake Usage Templates always show up to date data?

Answer: Yes. These templates rely on the Snowflake-provided views that are managed by Snowflake and are always up to date (up to a few hours latency).

Question: If Sigma updates the templates, will I have access to those changes?

Answer: It depends. Once Sigma publishes a change to a shared template like the SUTs, all Sigma organizations with access to that template will see those changes for all new explorations/workbooks launched from that template. Any workbooks created from the template before an update was pushed will not see the update.

For example: on 8/1/22, User1 creates Workbook A from the Cost Monitoring template. On 8/2/22, Sigma publishes a change to the Cost Monitoring template. User1 will not see the change in Workbook A. If User1 creates Workbook B from the Cost Monitoring template on 8/3/22 (after Sigma published the change), they will see the updated version with the change published 8/2/22.

Question: How do I know I have the current template?

Answer: Unless you launch a new workbook from the template and compare it to a preexisting workbook, there is currently no way to verify if a workbook you created previously is the current version. We are working on a solution for this.

Related Resources

Get Started with Templates
Create and Edit Templates
Connect to Snowflake