Model sync (Reverse ETL) from Snowflake query to Salesforce
Model sync (Reverse ETL) from Snowflake query to Salesforce
UI demo video
Watch the same steps in the Polytomic admin console in this demo video.
Code
Set your Polytomic API key as an environment variable:
This example covers four steps:
- Create a Snowflake Connection.
- Create a Salesforce Connection.
- Create a model over a custom Snowflake query.
- Sync data from Snowflake into Salesforce.
1. Create a Snowflake connection
The Snowflake instance must be reachable from Polytomic over the network. For details, see the Snowflake connection guide.
cURL
Python
Typescript
Go
2. Create a Salesforce connection
The following request creates a Salesforce Connection. See the Salesforce connection configuration for the required fields.
cURL
Python
Typescript
Go
Salesforce Connections authenticate with OAuth. Open the URL returned in the auth_url field of the response to complete the flow.
OAuth redirection
By default, the API expects auth_url to open in a new browser window.
Set the optional redirect_url parameter in the request body to change
the redirect target.
3. Create a Snowflake model
Create a model over a Snowflake query:
cURL
Python
Typescript
Go
Listing source objects
To enumerate the sources available on a Connection, see this example.
4. Sync the Snowflake model into Salesforce
The sync maps email, first_name, and last_name from the Snowflake model onto the matching Salesforce Contact fields. Add more entries to the fields array to sync additional columns.
