Sync Salesforce opportunities to Snowflake
Recipe ToolsCRMMarketingDeveloper ToolDatabase
What it does
When a scheduled interval arrives, this automation queries Salesforce for opportunities and uploads them to Amazon S3. Snowflake then stages the data in a temporary table, merges it into production, and cleans up.
Who it's for
Data and analytics teams who need fresh Salesforce opportunity data in Snowflake without manual exports.
How teams use this
Keep Snowflake synced with Salesforce
Run this automation daily so your data warehouse always reflects the latest opportunities from Salesforce. Analysts can query fresh data without waiting for manual refreshes.
Load only qualified opportunities
Modify the bulk query to filter for opportunities in specific stages or with minimum deal size. Only the records that match your criteria are synced to Snowflake.
Sync to a different Snowflake schema
Point the bulk load and merge steps to a different schema or database so multiple teams can have their own opportunity datasets. The automation flow stays the same.
Add incremental load logic
Include a timestamp check in the bulk query to load only opportunities modified since the last run. This reduces data transfer and speeds up the sync.
How it works
- Run on a schedule. This automation starts at a specified interval so Snowflake always has the latest Salesforce opportunities.
- Query opportunities in bulk. Search Salesforce for opportunities using a bulk query so all records matching your criteria are retrieved at once from the API.
- Upload to Amazon S3. Upload the opportunity file to an S3 bucket with a unique name so Snowflake can access it for loading.
- Stage, merge, and clean up. Create a temporary table in Snowflake, bulk load the S3 file into it, merge the data into the production table, and drop the temp table.