Using SELECT

Usage Groups

Feature Overview

Usage Groups provide a flexible way of creating cost categories within SELECT. They can be used to create showbacks or chargebacks for teams in your organization. That helps:

  1. Reduce the burden on central teams playing the role of 'query cop' 🚓
  2. Distribute costs across organizational units
  3. Encourage efficient use of Snowflake
  4. Flexibly allocate costs for shared warehouses using query metadata, user roles, and more

Managing Usage Groups

Usage Groups are managed from the Usage Groups page, accessible from the sidebar.

Usage Group Sets

Usage Group Sets are containers for Usage Groups. Typically, an organization will create a Usage Group Set called 'Teams' to categorize spend by team. Additional Usage Group Sets can be created for different spend categorizations, such as 'Projects'.

Create your first usage group set by heading to the Usage Groups tab in the sidebar, and then clicking 'Manage Sets' from the 'Usage Group Set' dropdown.

Creating Usage Groups

Usage Groups consist of a name and set of rules. To create a new Usage Group, click the 'New Group' button. An empty Usage Group will be created:

Creating a new Usage Group

Start typing in the input to get suggestions on corresponding values, along with their cost. Rules can be added and deleted using the buttons on the right.

Usage Group Order

Usage Groups can have overlapping rules. The order of the Usage Groups determines the precedence when assigning workloads. To adjust the order, click and drag using the triple line buttons.

Options for Account-Level Usage Groups

You can create Usage Groups for individual Snowflake accounts based on Snowflake resources:

  • Warehouse
  • Database
  • Automatic Clustering
  • Snowpipe

Or more flexibly using query metadata:

  • User Name
  • Role Name
  • dbt metadata
    • dbt meta keys
    • dbt target name
    • dbt target database & schema
    • dbt resource database & schema
    • dbt resource type
    • custom top-level keys
  • Custom metadata fields
  • Looker metadata
    • Dashboard title
    • Looker user name
  • Fivetran schema name

Options for Organization-Level Usage Groups

When creating Usage Groups for your entire Snowflake organization (from the Organization Section of SELECT), you have the following options:

  • Snowflake Account Name
  • Service (Compute, Storage, Data Transfer, Serverless Tasks, etc.)
  • Snowflake Region (AWS_US_EAST_1, GCP_US_EAST4, AZURE_WESTEUROPE, etc.)
  • Warehouse Name

Usage Group Rules

When assigning Snowflake resources or query metadata fields to a Usage Group, you have three options:

  1. in: The 'in' operator matches to exact values, and is case sensitive.
  2. includes: The 'includes' operator matches to sub-values, and is case insensitive. For example, if you wanted to flexibly assign all databases that include _dev in the name, you would use this option.
  3. starts with: The 'starts with' operator matches only on the start of strings. For example, to match on all warehouses starting with BI_, you could use this option.

Usage Group Version History

Usage Group updates are tracked and can be restored from the version history. To view the version history, click on the "Version History" button on the usage groups page. This will show a list of all previous versions of the usage groups. To view the definitions for a version, simply click on the version, and it will be displayed in the usage group definitions UI. To restore a version, click on the "Restore" button. This will create a new version from the historic version.

Usage group versions

Usage Groups throughout SELECT

Usage Groups can be utilized throughout SELECT, including insights. The all workloads page provides the ability to filter to specific Usage Groups, in addition to slicing.

Using Usage Groups on the all workloads page

Sending automated reports for Usage Groups

In order to help raise Snowflake cost awareness in your company, we recommend setting up a Monitor so that each Usage Group can receive a scheduled Spend Digest. Here's an example Weekly Spend Digest report sent to Slack:

SELECT usage group weekly spend digest

Upcoming improvements

In future releases, we will provide versioning for usage groups, and the ability to import and export via JSON and YAML. We are continually adding support for more Snowflake services to usage groups. If you have a specific attribute or Snowflake resource you'd like to use with Usage Groups, please reach out to the SELECT team.