Create and populate a SQL table in Collections on schedule
Recipe ToolsDatabase
What it does
When a scheduled time arrives, this automation creates a table in Collections using SQL. It inserts a row and retrieves rows so someone can reference the stored data in other workflows.
Who it's for
Data and analytics teams who need to build and maintain SQL tables in Collections on a recurring schedule.
How teams use this
Build a daily snapshot table
Create a table each day and insert that day's data, then query it to feed reports. The same structure runs every 24 hours so historical data accumulates in Collections for analysis.
Sync data from an external source
Insert rows from an API or database into the Collections table on schedule, then query it to enrich records in your CRM. Only the data source changes, not the table structure.
Add filtering to the select query
Modify the final SQL query to filter rows by date, status, or another column so only relevant data is retrieved. Set a where clause to narrow the results before they flow downstream.
How it works
- Run on a specified interval. This automation starts at the scheduled time you set, such as daily or weekly, and triggers the SQL queries in Collections.
- Create the table in Collections. Run a SQL query to create a table with the columns and data types needed for this automation's data.
- Insert a row into the table. Run a SQL query to insert a new row with values into the table that was just created.
- Retrieve rows from the table. Run a SQL query to select and retrieve rows from the table so the data is available for other workflows.