Update SQL Server rows on a scheduled interval
Recipe ToolsData ParserDatabase
What it does
When a scheduled time arrives, this automation parses a CSV file and updates rows in a SQL Server table. Someone can rely on the data staying current without manual intervention.
Who it's for
Data and analytics teams who need to refresh SQL Server tables on a regular schedule.
How teams use this
Refresh customer data nightly
Set the interval to run each night so the SQL Server customer table always has the latest information from the CSV export. The team starts each day with current data.
Sync inventory counts hourly
Change the interval to every hour so warehouse inventory levels in SQL Server stay in sync with the source CSV throughout the day. No manual updates are needed.
Filter rows before the update
Add a condition after parsing the CSV to check a status column and only update rows that meet certain criteria. This keeps the table clean and prevents stale records from overwriting good data.
How it works
- Wait for the scheduled time. At the specified interval, the Clock trigger wakes up this automation and begins the update process for the SQL Server table.
- Parse the CSV file. The Csv Parser extracts and structures the data from the CSV so it matches the columns and format needed for the SQL Server table.
- Update the SQL Server table. Write the parsed data into the dbo.Table_with_all_datatype table in SQL Server, replacing or adding rows as needed.