Managing Compute Resources

The Compute area in the new web interface allows users to take the following actions:

Tab

Description

Query History

View the details of all queries executed in the last 14 days. Explore the execution plan of queries.

Warehouses

View a set of warehouses and explore details of individual warehouse. . . Create, modify, and drop warehouses. . . Manually suspend or resume warehouses. . . Access control: View the privileges that have been granted on individual roles; grant or revoke privileges.

Resource Monitors

View resource monitors and explore resource monitor details. . . Create, modify, and drop resource monitors. . . Resume or suspend resource monitors. . . Manage access control for resource monitors.

In this Topic:

Monitoring Queries in the Query History

Navigation:

Compute » Query History

The Query History page displays a historical listing of queries, including queries executed from SnowSQL or other SQL clients executed in the last 14 days.

For more information about the page, see Analyzing the Query History.

Managing Warehouses

Navigation:

Compute » Warehouses

The Warehouses page enables administrators to create and manage warehouses.

Creating Warehouses

Navigation:

Compute

  1. Click the Create » Warehouse dropdown in the top-right corner of the page. The New Warehouse dialog opens.

  2. Specify the following properties:

    Property

    Description

    Name

    Unique identifier for the warehouse.

    The identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (e.g. "My object"). Identifiers enclosed in double quotes are also case-sensitive.

    Size

    Size of the warehouse. The size determines the amount of compute resources in the warehouse and, therefore, the number of credits consumed while the warehouse is running.

    Comment (optional)

    Comment for the warehouse.

  3. Click the Advanced Warehouse Options show/hide control to display the following additional fields:

    Property

    Description

    Auto Resume

    Enable to automatically resume a warehouse when a SQL statement (e.g. query) is submitted to it. Disable to only resume the warehouse explicitly using ALTER WAREHOUSE or through the Snowflake web interface.

    Auto Suspend

    Enable to suspend the warehouse automatically after the number of seconds of inactivity specified in Suspend After. The warehouse can be suspended explicitly using ALTER WAREHOUSE or through the Snowflake web interface.

    Suspend After

    Number of seconds of inactivity after which a warehouse is automatically suspended. Input any integer greater than 0 or NULL.

    Note that setting a value less than 60 is allowed, but many not result in the desired/expected behavior because the background process that suspends a warehouse runs approximately every 60 seconds and, therefore, is not intended for enabling exact control over warehouse suspension.

  4. Click the Create Warehouse button. The new warehouse is created.

Modifying Warehouse Properties

Navigation:

Compute

  1. Click the actions () button in the row for a warehouse » Edit. The Edit Warehouse dialog opens.

  2. Edit any of the properties. For descriptions of the properties, see Creating Warehouses (in this topic).

Resuming or Suspending a Warehouse

Navigation:

Compute

  1. Click the actions () button in the row for a warehouse » Resume (if the warehouse is currently suspended) or Suspend (if the warehouse is currently running). The dialog for the specified action opens.

    If resuming the warehouse, specify the warehouse size. You can choose the default size or a different size.

  2. Confirm the action.

Managing Access Control on Warehouses

Navigation:

Compute

  1. Navigate to the warehouse you want to grant privileges on.

  2. Scroll to the Privileges area of the page. The Privileges area lists the privilege grants by role. To group the list by privilege, choose this option from the menu at the top of the Privileges area.

    When the listing of privilege grants is grouped by privilege, the Inherited privileges symbol beside a role indicates that the privilege was inherited from a child role in a role hierarchy. Hover your pointer over the role to view the child role from which the privilege was inherited.

    Administrators of warehouses can perform either of the following actions to manage the privileges granted on warehouses:

    Either action requires one of the following roles:

    • The owner of a warehouse (e.g. the role with the OWNERSHIP privilege on the warehouse).

    • A role with the global MANAGE GRANTS privilege.

Granting Privileges on Warehouses to Other Roles

To grant privileges on warehouses:

  1. From the Privileges area on the details page for a warehouse, click the + Privileges button. The Grant new privileges dialog opens.

  2. Select a role from the dropdown menu.

  3. Select a privilege from the dropdown menu. The dialog displays the privilege below the dropdown menus. To give the selected role the ability to grant the privilege to other roles, click the Grant option box.

  4. Repeat the previous step for any additional privileges you want to grant to the same role.

  5. Click the Grant Privileges button. The dialog closes. The privileges you selected are added to the role.

Revoking Privileges on Warehouses From Other Roles

To revoke privileges on warehouses:

  1. From the Privileges area on the details page for a warehouse, click on the row for a role. The Edit privileges for <role_name> dialog opens. The dialog lists the privileges currently granted on the warehouse to the selected role.

  2. Click the X button to the right of a privilege. The privilege is removed from the dialog.

  3. Repeat the previous step for any additional privileges you want to revoke from the same role.

  4. Click the Update Privileges button. The dialog closes. The privileges you removed are revoked from the role.

Dropping Warehouses

Navigation:

Compute

  1. Click the actions () button in the row for a warehouse » Drop. The Drop Warehouse dialog opens.

  2. Confirm the action.

Managing Resource Monitors

Navigation:

Compute » Resource Monitors

The Resource Monitors page enables administrators to create and manage resource monitors.

Creating Resource Monitors

Navigation:

Monitor

  1. Click the + Resource Monitor button in the top-right corner of the page. The New Resource Monitor dialog opens.

  2. Complete the fields in the dialog:

    Property

    Description

    Name

    Unique identifier for the resource monitor.

    The identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (e.g. "My object").

    Identifiers enclosed in double quotes are also case-sensitive.

    Credit Quota

    Number of credits allocated to the resource monitor per frequency interval.

    When total usage for all warehouses assigned to the monitor reaches this number for the current frequency interval, the resource monitor is considered to be at 100% of quota.

    Monitor Type

    Type of resource monitor: ACCOUNT or WAREHOUSE.

    The account-level resource monitor controls credit usage for all warehouses in your account; whereas a warehouse-level resource monitor controls credit usage for one or more specified warehouses.

    Warehouse

    Warehouse-level resource monitors only. One or more warehouses whose credit usage is controlled by the resource monitor.

    Schedule

    The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses.

    Actions

    One or more triggers for the resource monitor.

  3. Click the Create Resource Monitor button. The new resource monitor is created.

Modifying Resource Monitor Properties

Navigation:

Monitor

  1. Click the actions () button in the row for a resource monitor » Edit. The Edit Resource Monitor dialog opens.

  2. Edit any of the properties. For descriptions of the properties, see Creating Resource Monitors (in this topic).

Dropping the Resource Monitor

Navigation:

Monitor

  1. Click the actions () button in the row for a resource monitor » Drop. The Drop Resource Monitor dialog opens.

  2. Confirm the action.

Managing Access Control on Resource Monitors

Navigation:

Monitor

  1. Navigate to the resource monitor you want to grant privileges on.

  2. Scroll to the Privileges area of the page. The Privileges area lists the privilege grants by role. To group the list by privilege, choose this option from the menu at the top of the Privileges area.

    When the listing of privilege grants is grouped by privilege, the Inherited privileges symbol beside a role indicates that the privilege was inherited from a child role in a role hierarchy. Hover your pointer over the role to view the child role from which the privilege was inherited.

    Administrators of resource monitors can perform either of the following actions to manage the privileges granted on resource monitors:

    Either action requires one of the following roles:

    • The owner of a resource monitor (e.g. the role with the OWNERSHIP privilege on the resource monitor).

    • A role with the global MANAGE GRANTS privilege.

Granting Privileges on Resource Monitors to Other Roles

To grant privileges on resource monitors:

  1. From the Privileges area on the details page for a resource monitor, click the + Privileges button. The Grant new privileges dialog opens.

  2. Select a role from the dropdown menu.

  3. Select a privilege from the dropdown menu. The dialog displays the privilege below the dropdown menus. To give the selected role the ability to grant the privilege to other roles, click the Grant option box.

  4. Repeat the previous step for any additional privileges you want to grant to the same role.

  5. Click the Grant Privileges button. The dialog closes. The privileges you selected are added to the role.

Revoking Privileges on Resource Monitors From Other Roles

To revoke privileges on resource monitors:

  1. From the Privileges area on the details page for a resource monitor, click on the row for a role. The Edit privileges for <role_name> dialog opens. The dialog lists the privileges currently granted on the resource monitor to the selected role.

  2. Click the X button to the right of a privilege. The privilege is removed from the dialog.

  3. Repeat the previous step for any additional privileges you want to revoke from the same role.

  4. Click the Update Privileges button. The dialog closes. The privileges you removed are revoked from the role.