dbt source freshness, ensuring your data meets defined SLAs by regularly checking when source tables were last updated and alerting you of any staleness issues. Use this template when you need to monitor critical data sources - for example, ensuring your daily sales data is loading properly or verifying that customer data is being updated within expected timeframes.
Key Benefits
- Ensures critical data sources meet defined freshness SLAs
- Quickly identifies issues with upstream data loading jobs
- Prevents analytics teams from using stale data
- Tracks and reports on source data freshness for downstream processes
Default Configuration
Schedule Settings
Command Settings
The template uses a single command to monitor your data sources:dbt source freshness: Validates the freshness of all configured source tables by:- Checking the timestamp in each table’s
loaded_at_field - Comparing this timestamp against your defined warning and error thresholds
- Reporting success or failure based on these comparisons
- Checking the timestamp in each table’s
For additional source freshness configurations, see Source Freshness documentation.
Trigger Type
- Type: Scheduled Run (Cron)
- Cron Schedule:
0 */2 * * *(Every 2 hours, starting at minute 0 to balance frequent data updates and reasonable resource usage)
For custom Trigger configurations, see Trigger Types documentation.
Notification Settings
- Email Alerts:
- Success: Confirms all sources are within freshness thresholds
- Failure: Alerts when sources exceed error thresholds
- SLA Breach: Alerts when the freshness check itself exceeds 120 minutes
For custom notification configurations, see Notification Settings documentation.
When to Customize
Tailor this template to your specific needs:- Adjust trigger type based on SLA requirements:
- Hourly checks for critical sources
(0 * * * *) - Daily checks for stable sources
(0 0 * * *) - Weekly checks for historical analysis (
0 0 * * 0)
- Hourly checks for critical sources
- Add notification destinations (Slack, MS Teams) for team collaboration