Prerequisites
Whitelist CData IPs
To establish a connection to Snowflake, you need to allow access to Snowflake via CData’s IP. When hosting Snowflake behind a firewall, you must safelist these IP addresses in your firewall.- Range:
52.224.0.160to52.224.0.175and4.154.117.160to4.154.117.175. - CIDR notation:
52.224.0.160/28and4.154.117.160/28
Ensure Snowflake Is Publicly Accessible
Provide a public facing IP/domain to connect to this data source. The following private IP ranges do not work:10.0.0.0to10.255.255.255172.16.0.0to172.31.255.255192.168.0.0to192.168.255.255127.0.0.1(aka ‘localhost’)
Setup Guide
Follow these steps to connect Snowflake to your Connect AI account:1
Open the Connections page of the Connect AI dashboard.
2
Click + Add Connection in the upper-right corner.
3
Type Snowflake into the search field, then click the data source name.
4
On the Basic Settings tab of the new connection, enter a connection name or keep the default name.
5
Enter the Snowflake Warehouse.
6
Enter the URL of the Snowflake database. Snowflake supports URLs in either the account name or connection name format.
- To use the account name, refer to Finding the organization and account name for an account in the Snowflake documentation.
- To use the connection name, use the SHOW CONNECTIONS command. The URL format depends on how you are connecting. Refer to the Connecting with a URL in the Snowflake documentation for help in entering the URL correctly. The following are a few examples of formatting the URL:
- Standard URL with account name:
https://<orgname>-<account_name>.snowflakecomputing.com. - Standard URL with connection name:
https://<orgname>-<connectionname>.snowflakecomputing.com. - Okta SSO:
https://<orgname>-<account-name>.snowflakecomputing.com(if your account name contains an underscore, change the underscore to a hyphen).
7
Select the Authentication method, then proceed to the relevant section and follow those instructions.
8
Under Data Credentials, determine if you want to allow shared credentials or to require users to use their own credentials.
Authentication Methods
- OAuth
- Password
- Private Key
- Okta
- PingFederate
1
In the User field, enter your Snowflake user name.
2
The Callback URL, or Redirect URL, is the URL you need (
https://oauth.cdata.com/oauth/) when setting up your OAuth app. Copy this URL and paste it into your OAuth app.3
Enter the OAuth Client Id assigned when you registered your Snowflake account.
4
Enter the OAuth Client Secret for your Snowflake account for OAuth.
5
Select the OAuth Authenticator that the OAuth application requests from Snowflake. If there is no authenticator, use the default None.
6
(Optional) Enter the Snowflake Database and Schema. Selecting a schema may improve performance for some applications.
7
Click Sign in to connect securely through OAuth. This action opens the Snowflake sign-in page in a new tab.
8
Log in to your Snowflake account and provide the requested permissions (if applicable).
9
At the top of the Connect AI Add Snowflake Connection page, click Save & Test.
- If the connection test succeeds, a Connection successfully saved message appears, indicating that your connection has been created. The Status on the Edit Connection page also changes to Authenticated. View the data model of your successful connection in the right pane of the Edit Connection page, in the Data Model tab.
- If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the Sign in button. Correct the errors and try again.
- Unsuccessful connections are saved as drafts and have a Status of Not Authenticated. You can return to the connection and authenticate it later.