Bulk sync (ELT) from Salesforce to Snowflake
Bulk sync (ELT) from Salesforce to Snowflake
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 three steps:
- Create a Salesforce Connection.
- Create a Snowflake Connection.
- Bulk Sync data from Salesforce into Snowflake.
1. 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.
2. 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
3. Create a Bulk Sync
Before creating the sync, poll the Get Schema Status endpoint for your Salesforce Connection ID until cache_status is cached. This confirms Polytomic has read the full Salesforce schema. Caching takes a few seconds after Step 1, and you should wait for it after connecting Polytomic to any SaaS platform.
ℹ️ Retry while schemas cache
Until the cache is populated, Bulk Sync creation returns:
This request is safe to retry until it returns a
2xxresponse.
Once the schema is cached, the following request creates a Bulk Sync that replicates the Salesforce Account and Contact objects into Snowflake. Omit schemas to sync every object on the source:
