Snowflake
Euno's Snowflake integration supports auto-discovery of:
- Snowflake Views and Tables 
- Hex Usage and Lineage Tracking 
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;
GRANT DATABASE ROLE SNOWFLAKE.GOVERNANCE_VIEWER TO ROLE euno_role;
GRANT DATABASE ROLE SNOWFLAKE.USAGE_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: Configure New Snowflake Source in Euno
Step 1: Access the Sources Page
- Go to the Sources page. 
- Click Add New Source and select Snowflake from the list. 
Step 2: General Configuration
Asterik (*) means a mandatory field.
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
Private Key*
The RSA private key used to authenticate to Snowflake. This value is stored securely and marked as a secret. You can either provide your own private key or use one generated by Euno by clicking Generate Credentials.
Passphrase*
The passphrase used to decrypt the private key. This value is stored securely and marked as a secret. You can either provide your own private key or use one generated by Euno by clicking Generate Credentials.
Generate Credentials (Button)
Automatically generate an RSA key pair and passphrase. The public key will be shown in a modal for you to paste into your Snowflake user; the private key and passphrase will be filled into the form and stored securely.
Note: This is convenient for quick testing or POCs, but for production we recommend supplying your own keys generated and managed according to your security policies.
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.
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.
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
- Toggle Schedule to activate updates. 
- Configure: - Weekly: Select the days and times for updates. 
- 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.
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.
Auto discover materialized views refresh history
Enable this for auto discovery of Snowflake materialized views refresh history. This feature is only available for Snowflake Enterprise edition
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.
BI Usage
Auto-discover BI usage from Snowflake
- Tableau usage - Discover Tableau workbooks/dashboards querying Snowflake to surface usage and dependencies. 
- Hex projects & lineage - Identify Hex projects that access Snowflake and derive lineage from query history. For more information see Hex Usage & Lineage Tracking 
Mapping
A dictionary that maps Snowflake database and schema names to alternative names in Euno. This is useful when you want to display different names for databases in Euno than what they're actually called in Snowflake. for example: source: source: /PROD_.* \.PUBLIC/ target: production.main
Override Host Uri
Overrides the base URI used for generating resource URIs (databases, schemas, tables, views). By default, Euno uses the host provided in the integration.
Include/Exclude Pattern
Use a regular expression to allow or exclude specific databases. ".*" will include or exclude all databases in the warehouse.
For Snowflake Shares related configuration, see Observing Snowflake Shares.
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:
- 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_roleaccess 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:
- Uncheck the box "Use Snowflake system database to query for Snowflake views" in the integration configuration. 
Hex Usage & Lineage Tracking
When "Discover Hex usage" is enabled, the Snowflake integration automatically observes lineage data from Hex queries executed against Snowflake.
What is observed:
- Hex Projects: Discovery of Hex projects that execute queries against Snowflake 
- Project Lineage: Which Snowflake tables and columns are accessed by each Hex project 
How it works:
Hex embeds metadata in SQL query comments when executing queries against Snowflake. This metadata includes:
- Project ID and name 
- User email 
- Cell ID (for tracking specific notebook cells) 
The Snowflake integration parses these comments from the query history and correlates them with table access information to provide comprehensive lineage tracking of Hex activities.
Requirements:
- Hex queries must include metadata comments (this is automatic for standard Hex usage) 
- The Snowflake role must have access to - snowflake.account_usage.query_historyand- snowflake.account_usage.access_history
- The integration must have permissions to read query history data 
This feature helps organizations understand which Hex analytics projects are accessing their Snowflake resources and track data lineage from Hex to Snowflake tables.
Last updated
