Sync petition data to MySQL on a schedule
Recipe ToolsMarketingData ParserUtilitiesDatabase
What it does
When the clock triggers every 5 minutes, this automation parses incoming data and inserts petition records into the l2s_petitions table in MySQL. Someone can then query the table to verify all records were loaded.
Who it's for
Data and analytics teams who need to load petition data into MySQL on a regular cadence.
How teams use this
Load petition data every 5 minutes
Run this automation on the 5-minute schedule to keep the l2s_petitions table in sync with incoming petition records. No manual steps are needed once the mapping is configured.
Adjust the schedule for peak hours
Change the clock trigger to run every 1 minute during business hours and every 30 minutes after hours. The rest of the flow stays the same.
Add validation before insert
Include a condition to check that required petition fields are present in the incoming data before inserting the row. Only valid records are written to MySQL.
Monitor load failures for the team
Set up an alert to notify the data team when a petition record fails to insert into MySQL. The team can then investigate and rerun the sync.
How it works
- Run every 5 minutes. This automation starts on a schedule every 5 minutes so petition data stays current in the database without manual intervention.
- Parse the petition data. Json Parser extracts petition fields from the incoming payload so they map correctly to the database columns for insertion.
- Insert row into l2s_petitions table. Write the parsed petition data as a new row in the l2s_petitions table in MySQL so the record is stored.
- Query all records in batches. Retrieve all rows from the l2s_petitions table in batches so someone can verify the petition data was inserted correctly.