Snowflake

Euno's Snowflake integration supports auto-discovery of:

  • Usage information of applications using Snowflake, like Tableau

Setting up Euno's Snowflake Integration

Step 1: Required Snowflake Permissions

In order to integrate with Euno, create a custom role in Snowflake with the permissions listed below. In the code snippet below, we create a user euno_user, with password and a role euno_role.

Euno discovers Snowflake resources by issuing SQL queries on Snowflake's system database and information schema. The Snowflake role require the Snowflake USAGE grant on a Snowflake warehouse. In the code snippet below, we use the warehouse euno_dwh.

CREATE ROLE euno_role;
CREATE USER euno_user PASSWORD='euno_password' DEFAULT_ROLE='euno_role';
GRANT ROLE euno_role TO USER euno_user;
GRANT USAGE ON WAREHOUSE euno_dwh TO ROLE euno_role;
GRANT DATABASE ROLE SNOWFLAKE.OBJECT_VIEWER TO ROLE euno_role;
GRANT DATABASE ROLE SNOWFLAKE.GOVERNANCE_VIEWER TO ROLE euno_role;

These grants do not provide the euno_role with access to your data, only to the metadata. To read more about these grants, see:

In some environments, users may prefer to grant the Euno integration access to read the metadata of views defined in specific databases, rather than to all the databases in the Snowflake account. For more information, see Control which views metadata Euno has access to.

In some environments, users may prefer to limit the rows or columns in the Snowflake query history that Euno integration has access to. For more information, see Using a non-default query history view.

Step 2: Snowflake Integration Configuration

Asterik (*) means a mandatory field.

Configuration
Description

Host*

This is the Snowflake host associated with your Snowflake account. Below are some examples of Snowflake hosts: - mycompany.eu-central-1.snowflakecomputing.com - org-account.us-west-2.snowflakecomputing.com

Username*

The Snowflake user to use for the integration

Password*

The password of the Snowflake user for the integration

Role

The Snowflake role to use. If you configured the Snowflake user to have a default role, you can keep this blank.

Warehouse

The Snowflake warehouse to use for queries. If you configured the Snowflake user to have a default warehouse, you can keep this blank.

Table to use for query history

Skip SSL certificate verification

Skip SSL certificate verification. This is used in cases where Euno accessess Snowflake through a proxy. We recommend leaving this unchecked.

Use Snowflake system database to query for Snowflake views

Using a non-default query history view

By default, Euno uses the system view snowflake.account_usage.query_history to discover the query history.

You might prefer, for security reasons, to limit the rows or columns that Euno integration has access to.

In that case, you can manually create a Snowflake view to expose a subset of the query hisotry. In order for Euno to use this non-default Snowflake view, the following columns, available in snowflake.account_usage.query_history, must be exposed by the view:

  • query_tag

  • total_elapsed_time

  • bytes_scanned

  • start_time

  • end_time

  • query_type

Make sure you grant Euno permissions to SELECT on this view. Below is an example of creating such a view, and excluding records that were initiated by the user PRIVATE_USER

CREATE OR REPLACE VIEW user.public.query_history_for_euno AS (
  SELECT query_tag, total_elapsed_time, start_time, end_time, bytes_scanned, query_type
  FROM snowflake.account_usage.query_history
  WHERE user_name != 'PRIVATE_USER'
);

GRANT SELECT ON VIEW user.public.query_history_for_euno TO ROLE euno_role;

Control which views metadata Euno has access to

By default, the Euno integration uses the system view snowflake.account_usage.views to discover all Snowflake views defined in the snowflake account.

In some environments, users may prefer to grant the Euno integration access to read the metadata of views defined in specific databases, rather than to all the databases in the Snowflake account.

To set up Euno this way, follow these steps:

  1. Grant the Snowflake role used by Euno access to the metadata of views defined in the needed database. For example, to grant the Snowflake role euno_role access to the metadata of views defined in the database example_database, execute:

GRANT USAGE ON DATABASE example_database TO ROLE euno_role;
GRANT USAGE ON ALL SCHEMAS IN DATABASE example_database TO ROLE euno_role;
GRANT REFERENCES ON ALL VIEWS IN DATABASE example_database TO ROLE euno_role;
GRANT USAGE ON FUTURE SCHEMAS IN DATABASE example_database TO ROLE euno_role;
GRANT REFERENCES ON FUTURE VIEWS IN DATABASE example_database TO ROLE euno_role;

These privileges do not provide the euno_role with access to the data in these views, only to the metadata. To read more about these privileges, see:

  1. Uncheck the box "Use Snowflake system database to query for Snowflake views" in the integration configuration.

Step 3: Configure New Snowflake Source in Euno

Step 1: Access the Sources Page

  1. Go to the Sources page.

  2. Click Add New Source and select Snowflake from the list.

Step 2: General Configuration

  1. Name: Enter a name for your Snowflake source (e.g., "Snowflake - Data Warehouse").

  2. Configuration Details:

    1. Host: Provide the Snowflake account URL.

    2. Username: Enter your Snowflake username.

    3. Password: Provide the associated password.

    4. Role: Specify the role to use.

    5. Warehouse: Enter the name of the Snowflake warehouse.

    6. Skip SSL Verification: Enable this option if you want to skip SSL verification.

Step 3: Scheduling Updates

  1. Toggle Schedule to activate updates.

  2. Configure:

    1. Weekly: Select the days and times for updates.

    2. Daily: Set the interval in hours (e.g., every 12 hours).

Step 4: Advanced Settings (Optional)

Click on the 'Advanced' section to display these additional configurations.

  1. Configure:

    1. Query History Table: Specify the table containing query history.

    2. Extract Views: Enable this to extract view data.

    3. Extract Tableau Usage: Enable this to extract Tableau usage data.

    4. Use Snowflake System Database: Enable this option to use the Snowflake system database for view collection.

    5. Mapping:

      1. Define the target database patterns.

      2. Use Allow With and Deny With to include or exclude specific databases.

  2. Click the Save button to complete advanced configuration setup.

Step 5: Save Configuration

Click the Save button to complete the setup.

Last updated