Snowflake

Configuration

Prerequisites

If your database is hosted behind a Firewall, you need to add our IP addresses to the Firewall whitelist.

Connecting the data source

  1. On the Data sources page, click Connect, and select Snowflake in the Data sources list.

  2. In connection settings, specify all the necessary credentials.

  1. Select the preferred authentication setting:

  • OAuth - each user will be asked to authenticate Snowflake via OAuth flow to obtain a personal token.

  • Key-pair - enhanced authentication security method which requires, as a minimum, a 2048-bit RSA key pair. To configure key-pair authentication, check out Snowflake documentation.

  • Password - all requests to Snowflake are made with the username/password entered during creation.

  1. (Optional) If you need to be able to override the default data source database with a custom value in an action, you can enable the Allow override database name in action setting.

Once enabled, when configuring the action, you will be able to specify the custom database. In case a database is not specified, the default data source database will be used.

  1. Click Test connection to verify whether the connection can be established and then proceed to Connect Datasource.

Snowflake OAuth configuration

Snowflake OAuth supports role-based access and audit user requests made from the UI Bakery application.

In the 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 below:

  1. Create a security integration. Replace UI_BAKERY_REDIRECT_URL with the value from the 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 Client secret of the security integration.

  SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('UIBAKERY');
  1. Paste these values to the corresponding fields in the connection settings and click Connect to snowflake.

  1. Finally, click Connect Datasource.

When users make a request to the datasource for the first time, they will be prompted to authenticate themselves with Snowflake.

Updating datasource connection setting will revoke all user tokens, so users will be asked to authenticate again.

Usage

Once you've established the connection between UI Bakery and Snowflake, you can start interacting with its data. For this purpose, you can use the SQL Query action step:

  1. Add a new action, select your data source, and select SQL Query from the actions list.

  1. Next, specify your query and click Execute action to launch it.

  2. Check the Result tab to make sure your data is loaded.

Last updated

Was this helpful?