Guides

Features

Advanced

Connect a Snowflake Database: ALTR platform

In this guide, we will show you how to connect your Snowflake Database on the ALTR platform. Also helpful for users adding additional databases.

Setup ALTR Service User

In order to integrate ALTR with your snowflake account, ALTR needs a snowflake 'Service User' with appropriate permissions to build and enforce governance policy.  This can be done by giving Snowflake a user and role for ALTR to programmatically use. Here's how:

  1. In a new Worksheet under the 'Settings' in the top right corner set the following:
    a. Role to ACCOUNTADMIN. If you cannot select ACCOUNTADMIN, ask your Snowflake DBA to grant your user permission.
    b. Set 'Warehouse' to the warehouse you are permissioned to use.
    c. Set 'Database' to the database where you will be creating a procedure.
    d. Set 'Schema' to the schema where you will be creating a procedure.

      2. Create your service user by copying the CREATE USER statement below into your Snowflake Worksheet.

Copy Create User Statement


        a. Replace the default password, '[password]' with a secure password.
        b. Do not change the user name "ALTR_SERVICE_USER"
           You will need this user name and password later to connect your Snowflake Database in the ALTR console.
        c. Run the statement to create your service user.

Snowflake worksheet







3. Configure Service User

 with SETUP_ALTR_SERVICE_ACCOUNT for service account configuration. To add this procedure to your Snowflake database, copy and paste the below CREATE OR REPLACE PROCEDURE statement into the Worksheet and press the “Run” button.
Copy Stored Procedure







4.  Copy & paste the below CALL statement into your Snowflake Worksheet and press the “Run” button to invoke the procedure. This may take multiple minutes to execute, depending on the complexity of your Snowflake configuration.
Copy Call Statement

Adding Your Database In ALTR

Once you have successfully setup the service account, you can add your database in the platform following these instructions:

1.    Log in to the ALTR portal

2.    Go to Data Configuration > Data Sources > Add New

3.    On the right side of the page use the Connect Data Source pane to add your snowflake database, providing the following information:

·      Data source Name: A nickname for your database

·      Data source Type: ‘Snowflake Cloud Integration’

·      Connection Type: ‘User Authentication’

·     Data Source Hostname: Your Snowflake instance URL [Example: AAA000.snowflakecomputing.com] Note: If you’re using Snowsight follow the instructions at the end of this page to locate your URL.  

·      Service account ID: ALTR_SERVICE_USER.

·     Service account Password: Password created during step 2A in the service guide.

·     Database name: Your Snowflake database name.

Optional: Select the classify data & Add data usage analytics checkboxes to gain insights on your data.


4.     Click 'Connect' once you complete the form

5.     Status will be updated to 'Connected' and the database will appear on the data source screen. If your credentials are invalid an error message will pop-up. Please try again, if the problem persists, please contact support@altr.com.

Locate your Snowflake URL on Snowsight

  1. Go to bottom left corner and select the down arrow next to the snowflake icon

   2. Locate the zone that you are currently in -usually highlighted in Blue- and hover over it

   3. The URL icon can be found on the top right, copy the URL and paste it on "Snowflake Hostname"

First section of content