Connecting to SnowFlake DB from Studio with OKTA Authentication

How to Connect to SnowFlake DB from Studio with OKTA authentication?

Steps:

You can configure the ODBC connection for SnowFlake and use the same DSN in UiPath database activities to connect. Follow the below steps

Part 1: Installing and Setting up Snowflake ODBC

Step 1 - Download and install the Snowflake ODBC Client (32 Bit) from here .

Step 2 - Setup the ODBC System DSN.

  • Go to ODBC Data Source Administrator (32 Bit)
  • Go to System DSN tab
  • Click on Add
  • Click on Snowflake DSIIDriver.

  • Add the following parameters:

Data Source: Name of the Snowflake connection

User: Username for Snowflake

Password: Password for Snowflake

Server: Server URL can be picked as follows:

image.png

i.e. for e.g if Snowflake link is https://zu20643.europe-west2.gcp.snowflakecomputing.com/ , the value of Server URL is zu20643.europe-west2.gcp.snowflakecomputing.com. Kindly ensure to remove the "https://" and the "/" after the .com

Database: Name of the database(Optional)

Schema: Name of Schema (Optional)

Warehouse: Name of Warehouse(Optional)

Role: Your role(Optional)

Tracing (0-6): 0 for No tracing, 4 for Info Tracing, 6 for Detailed Tracing

The configuration dialog will look as follows:
image.png

Part 2: Connecting UiPath to Snowflake

  • Create a new project in UiPath Studio.
  • Add the following Package: UiPath.Database.Activities
  • Open the XAML file in editor and add the Connect activity from database package
  • In the CONNECT activity, click on Configure Connection -> Connection Wizard.
  • Choose Data Source as Microsoft ODBC Data Sourceimage.png
  • Configure the SnowFlake DSN
  • Click on "Refresh". Then select the DSN Created in Snowflake ODBC Driver.
  • Give username = Snowflake Username and password = Snowflake Password.image.png
  • Click on Test Connectionimage.png
  • Execute a Query and Save the data in a Datatable. The connection should work now.
Read more on the Okta SSO with Snowflake - MS Excel with ODBC .