Sync People.AI data to Snowflake on schedule

Recipe ToolsMarketingDeveloper ToolAPI IntegrationDatabase

What it does

When a scheduled interval triggers, this automation sends an HTTP request to People.AI to fetch records. It repeats the request twelve times and routes each batch to the correct Snowflake staging table.

Who it's for

Data and analytics teams who need to pull People.AI records into their data warehouse on a regular cadence.

How teams use this

Load People.AI records nightly

Run the sync every night at midnight to pull the latest People.AI data into Snowflake staging tables. The team wakes up to fresh records ready for analysis.

Route data to separate tables by source

Send batches one through eleven to PEOPLEAI_29_OCT and batch twelve to RAW_SRC so downstream processes can distinguish between incremental and full loads.

Add error handling and retry logic

Include a condition to check for HTTP errors and retry failed requests before inserting into Snowflake. Only insert rows when the request succeeds.

How it works

  1. Trigger on a specified interval. The automation runs at the scheduled time you set, starting the data sync from People.AI to Snowflake.
  2. Send HTTP request to People.AI. Send an HTTP request to People.AI to fetch the data. This step repeats twelve times, once for each batch of records to retrieve.
  3. Insert rows into Snowflake staging tables. Route each response to either the EDWSTAGE.PEOPLEAI_29_OCT table or the EDWSTAGE.RAW_SRC table based on the batch number, then stop when all twelve batches complete.