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.

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.

Supported options for creating Usage Groups

You can create Usage Groups based on Snowflake resources:

  • Warehouse
  • Automatic Clustering
  • Snowpipe
  • Databases, schemas or tables (coming soon...)

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

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 Groups throughout SELECT

Usage Groups can currently be utilized on both the Usage Group and all workloads pages. 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 the future, Usage Groups will support more attributes including query metadata from BI tools, table schemas, databases and other credit consuming Snowflake resources. It will also be possible to filter for a specific Usage Group from most pages in the SELECT UI. If you have a specific attribute or Snowflake resource you'd like to use with Usage Groups, please reach out to the SELECT team.