The Snowflake Monitor configuration screen enables users to set up key account details, including account URLs, authentication keys, and user details. This configuration allows for seamless integration with Snowflake accounts for monitoring and management purposes.

Prerequisite

To execute a query in Snowflake, the user must have the appropriate role with the required privileges. The role assigned to a user determines what actions they can perform, including querying data. You can also create a Cavisson-specific role and user to monitor Snowflake.

Execute the series of commands below in your Snowflake environment to create a user accessible for Cavisson. Steps to follow to create a new user and assign relevant privileges:

  1. Create a new role intended to monitor Snowflake usage. The name of the role is customizable.
    Cmd: create role cavissonAccess
  2. Grant usage to your default warehouse to the role of DATADOG.
    Cmd: grant usage on warehouse COMPUTE_WH to role cavissonAccess;
  3. Grant privileges on the SNOWFLAKE database to the new role.
    Cmd: grant imported privileges on database SNOWFLAKE to role caisson access
  4. Grant usage on the database schema.
    Cmd: GRANT IMPORTED PRIVILEGES on database SNOWFLAKE to role caisson access;
    Cmd: grant usage on schema SNOWFLAKE.ACCOUNT_USAGE to role cavissonaccess;
    Cmd: grant usage on schema SNOWFLAKE.ORGANIZATION_USAGE to role cavissonaccess;
  5. Grant Select permission on all views inside a schema
    Cmd: GRANT SELECT ON ALL VIEWS IN SCHEMA SNOWFLAKE.ACCOUNT_USAGE TO ROLE cavissonAccess;;
    Cmd: GRANT SELECT ON ALL VIEWS IN SCHEMA SNOWFLAKE.ORGANIZATION_USAGE TO ROLE cavissonAccess;
  6. Create a user.
    • CREATE USER userdemo
    • PASSWORD = 'passworddemo'
    • DEFAULT_ROLE = cavissonAccess
    • default_warehouse =COMPUTE_WH
  7. Grant the monitor role to the user.
    Cmd: grant role cavissonaccess to user userdemo

Snow Flake Configuration

Cmd: DESC USER example_user;
SELECT SUBSTR((SELECT "value"
FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()))
WHERE "property" = 'RSA_PUBLIC_KEY_FP'),
LEN('SHA256:') + 1);

Note :Enable Cloud Cost Management to receive Snowflake cost metrics aggregated from the SNOWFLAKE.ORGANIZATION_USAGE.USAGE_IN_CURRENCY_DAILY table. You can use these metrics with Cloud Cost Management to gain additional insight into your cost and usage.

Global Action Item

Configuration Table

The configuration table displays all the configured Snowflake accounts and provides the following columns:

Note: User need to click add button than it will display configuration table

Monitor