Snowflake
Connecting Snowflake database to UI Bakery

Prerequisites

If your database is hosted behind the Firewall, add the following IP address to the Firewall whitelist:
52.176.109.125

Configuration

To connect your Snowflake database, follow the below steps:
  1. 1.
    Go to the Data sources - Connect.
  2. 2.
    Select Snowflake from the list of the available sources.
  3. 3.
    Specify your credentials and click Test connection.
  4. 4.
    When the test connection is successful, click Connect Datasource.
Snowflake configuration screen
Make sure to specify the Role that has access to the required resource
With a password based authentication, all requests to Snowflake are made with the username/password entered during creation. With OAuth, each user will be asked to authenticate Snowflake via OAuth flow to obtain a personal token.

Snowflake OAuth configuration

Snowflake OAuth supports role based access and audit user requests made from UI Bakery application.
In case of OAuth connection setup, data source credentials will not be shared among UI Bakery users. Each user will be prompted to additionally authenticate themselves with Snowflake during the first usage of the app or when their token expires.
To configure Snowflake OAuth follow the steps bellow:
  1. 1.
    Create security integration. Replace UI_BAKERY_REDIRECT_URL with a value from UI Bakery Snowflake configuration screen.
CREATE SECURITY INTEGRATION UIBAKERY
TYPE = OAUTH
ENABLED = TRUE
OAUTH_CLIENT = CUSTOM
OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
OAUTH_REDIRECT_URI = 'UI_BAKERY_REDIRECT_URL'
2. Find client ID and secret of security integration.
SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('UIBAKERY');
3. Fill client ID and secret fields and click Connect to Snowflake
4. Click Connect Datasource.
Snowflake OAuth configuration example
The first time when users make a request to the datasource, they will be prompted to authenticate themselves with Snowflake.
Updating datasource connection setting will revoke all user token, so they will be asked to authenticate again.

Usage

Once you establish the connection, you can interact with the data.
  1. 1.
    Add a new action - SQL query. Specify your query and click Run action to launch it.
Note that pre-defined actions, such as Load Table, Create Row, etc. are not supported for Snowflake datasource.
2. Check the Result tab to make sure the data is loaded.
Last modified 17d ago
Copy link
Outline
Prerequisites
Configuration
Usage