Snowflake

Euno's Snowflake integration supports auto-discovery of:

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 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. The RSA_PUBLIC_KEY is generated by the source integration (see step 2).

CREATE OR ALTER ROLE euno_role;
CREATE USER euno_user 
    DEFAULT_ROLE='euno_role'
    RSA_PUBLIC_KEY= 'MIIBIjA...';
GRANT ROLE euno_role TO USER euno_user;
GRANT USAGE ON WAREHOUSE CORE TO ROLE euno_role;
GRANT DATABASE ROLE SNOWFLAKE.OBJECT_VIEWER TO ROLE euno_role;

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: 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

Asterik (*) means a mandatory field.

Configuration
Description

Name*

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

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

User*

The Snowflake user to use for the integration

Generate Credentials*

Click on the button to generate an RSA public key.

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.

Cost per credit (USD)

The credit price paid to Snowflake. this will be used to calculate table activity costs.

Storage cost per TB (USD) (optional)

The monthly storage rate in USD per terabyte, used to estimate storage costs for Snowflake tables. If not set, storage cost calculations will be omitted.

Observe warehouse information

Tick this option to enable warehouse size information

Step 3: Scheduling Updates

  1. Toggle Schedule to activate updates.

  2. Configure:

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

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

Step 4: Resource Cleanup

To keep your data relevant and free of outdated resources, Euno provides automatic resource cleanup options. These settings determine when a resource should be removed if it is no longer detected by a source integration. For a detailed explanation on Euno's cleanup strategies, see: Resource Sponsorship in Euno.

  • Immediate Cleanup: Remove resources not detected in the most recent successful source integration run.

  • No Cleanup: Keep all resources indefinitely, even if they are no longer detected.

Step 5: Advanced Settings (Optional)

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

Configuration
Description

Skip SSL certificate verification

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

Auto discover views & tables metadata

Enable this for auto-discovery of Snowflake views and tables metadata.

Use Snowflake system database to collect views

By default, Euno uses the system view snowflake.account_usage.views to discover all Snowflake views and tables defined in the snowflake account. If you prefer not to grant the integration permissions to query the views and tables definitions on all databases, See Control which views metadata Euno has access to.

Auto discover Tableau usage

Enable this to for auto-discovery of Tableau's usage data on Snowflake.

Query history table

By default, Euno uses the table snowflake.account_usage.query_history to access your Snowflake's query history. If you prefer to use a different table, enter it here. See "Using a non-default query history view" below.

Database pattern

Use a regular expression to allow or exclude specific databases. ".*" will include or exclude all databases in the warehouse.

Step 6: Save Configuration

Click the Save button to complete the setup.


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;
  1. Uncheck the box "Use Snowflake system database to query for Snowflake views" in the integration configuration.

Last updated