Snowflake is a cloud-based data platform that provides data warehouse-as-a-service (DWaaS) capabilities, allowing businesses to store, process, and analyze large volumes of data efficiently.
Integrating Snowflake with Forethought lets you use Actions to make API calls to your Snowflake database and retrieve data for use in Solve.
Setup Guide
To connect Snowflake to Forethought, first create a custom OAuth client in Snowflake. Then, obtain your Account, Client ID, and Client Secret. Once you have these credentials, use them to complete the integration with Forethought.
Create a Snowflake OAuth integration
First, you need to create a Snowflake OAuth integration. For reference, see Create a Snowflake OAuth integration.
1. Log in to your Snowflake account.
2. On the left side of your homepage, click + Create > SQL Worksheet.
3. Copy and paste this SQL command:
CREATE SECURITY INTEGRATION forethought
TYPE = oauth
ENABLED = true
OAUTH_CLIENT = custom
OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
OAUTH_REDIRECT_URI = 'https://integrations-api.forethought.ai/snowflake/authorize/success'
OAUTH_ISSUE_REFRESH_TOKENS = TRUE
OAUTH_REFRESH_TOKEN_VALIDITY = 7776000;
Note: The above query will set the expiry of any OAuth session to a maximum 7776000 seconds (90 days) allowed by Snowflake. This means that you will have to return to this page and re-authenticate a minimum of every 90 days to ensure uninterrupted service. Please contact your Snowflake support to have this limit raised if you want.
4. Click the Run button.
5. You have now created an OAuth integration for Forethought.
Find your Account
In Snowflake, the Account is a unique identifier assigned to your Snowflake instance. To find your Account, follow these steps:
1. Create a SQL worksheet.
2. Copy and paste this SQL command:
SELECT CURRENT_ORGANIZATION_NAME() || '-' || CURRENT_ACCOUNT_NAME();
3. Copy your Account and paste it into the Forethought Integrations page.
Retrieve the OAuth client ID and secret
1. Create a new SQL worksheet.
2. Copy and paste the command below into your SQL worksheet:
SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS( 'FORETHOUGHT' );
3. You will see the client ID and secret.
4. Copy the Client ID and Secret and paste these to the Forethought Integrations page.
Integrate with Forethought
1. In your Forethought dashboard, go to Settings > Integrations.
2. Search for Snowflake.
3. Enter your Account, OAuth Client ID, and Client Secret.
Note: When copying the Client ID and Client Secret, do not include quotation marks to prevent errors.
4. Click Connect.
5. Sign in to your Snowflake account when prompted.
6. Wait a few seconds for the connection to complete. You’ll be redirected back to your Forethought dashboard.
Your Snowflake is now connected with Forethought!
Using Snowflake in Actions
Now that you've integrated with Snowflake you can use it to authorize requests in Action Builder. Follow these steps:
- Navigate to Solve > Action Builder > + Create new action. For more details on creating actions, refer to this guide.
- Click Authorization.
- Select Integration as the authentication type.
- Choose Snowflake as the authentication value.
This action will now use the Snowflake Credentials you setup to authenticate API Requests to your Snowflake Database.
If you encounter any issues, contact our support team.
Comments
Article is closed for comments.