Overview:
Snowflake can be used as a source for users who have high security demands and apprehensions regarding sharing credentials or providing access to the CRM data. You can integrate Snowflake as a source and set up workflows in which you can decide what tables/data you want to import into Revsure for ingestion.
Steps to Setup
Navigate to Revsure App Instance
.png)
Click "Data Hub"
.png)
Click "Data Sources"
.png)
In a new tab, navigate to https://app.snowflake.com/
Navigate to a SQL Worksheet and run the following command to add Revsure Integration
US :
CREATE SECURITY INTEGRATION REVSURE
TYPE = OAUTH
ENABLED = TRUE
OAUTH_CLIENT = CUSTOM
OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
OAUTH_REDIRECT_URI = 'https://gw.revsure.cloud/data-hub/v1/oauth/callback'
OAUTH_ISSUE_REFRESH_TOKENS = TRUE
OAUTH_REFRESH_TOKEN_VALIDITY = 7776000;
EU :
CREATE SECURITY INTEGRATION REVSURE
TYPE = OAUTH
ENABLED = TRUE
OAUTH_CLIENT = CUSTOM
OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
OAUTH_REDIRECT_URI = 'https://gw.revsure-eu.cloud/data-hub/v1/oauth/callback'
OAUTH_ISSUE_REFRESH_TOKENS = TRUE
OAUTH_REFRESH_TOKEN_VALIDITY = 7776000;
.png)
Execute the Query
.png)
After Integration is created, run the following command
SELECT
PARSE_JSON(SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('REVSURE')):OAUTH_CLIENT_ID::STRING AS client_id,
PARSE_JSON(SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('REVSURE')):OAUTH_CLIENT_SECRET::STRING AS client_secret;
.png)
Retrieve Client ID
.png)
Client Secret
.png)
Next, we also need the custom Instance URL for the connection.
Execute the following query :
SELECT
'https://' || CURRENT_ORGANIZATION_NAME() || '-' || CURRENT_ACCOUNT_NAME() || '.snowflakecomputing.com'
AS custom_instance_url;
.png)
Back onto the Revsure App Data Hub, Click Add New
.png)
Select Snowflake from the list of Sources
.png)
Set the "Connection Name" field.
.png)
Fill your instance URL in the "Custom URL" field.
.png)
Set the "Warehouse" field.
.png)
From the Snowflake, use the retrieved information to set the "Client Id" and "Client Secret" fields.
.png)
Click "Connect"
.png)
This takes you to "Sign in to Snowflake to authorize REVSURE"
.png)
Click here.
.png)
Use your credentials to authorize the same.
.png)
A message of "Authorization successful" would be received
The Connection is created. The details can be seen on the Configuration Tab.
Move to the Workflow tab to set up the workflows for the Extraction of Tables
.png)
Click "New Workflow"
.png)
Choose the Database Schema.
.png)
Select the Tables you wish to pull
.png)
Select the Columns of the table you wish to pull
.png)
Select the Primary Key (Essential for Delta Syncs)
.png)
Under Sync Setting, Full and Delta Options are Available.
.png)
If Delta is selected, a Date/Timestamp Column for Delta should be selected
.png)
Click on the Dropdown and choose the Column
.png)
Give the Workflow a Name.
Set Historical Date from the Date Widget - From where you want data to be pulled.
Also Frequency for the time for Sync.
.png)
Type "Daily Workflow"
Click "Save"
.png)
At Save, there would be 2 Options - Sync Now and Sync Later.
Sync Now - Triggers a Sync right away.
Sync Later - The next Sync would start at the Selected Frequency.
.png)
You can check the Status and Other Live information at the Workflow Summary now.
.png)