# Snapshot Source Data Freshness

This template creates a schedule to monitor source data freshness using `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.

{% hint style="success" %}

#### 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
  {% endhint %}

{% hint style="warning" %}

#### Prerequisites

* [Scheduler Environment](/app-help/documentation/settings/connections/scheduler-environment.md) is connected to your data warehouse provider.
* [Source freshness configurations](/app-help/documentation/bolt/managing-schedules/analyzing-run-details/configuring-source-freshness.md) in your `sources.yml` file
  {% endhint %}

{% @arcade/embed url="<https://app.arcade.software/share/lcNBJHYU3XhHj29Ga4Q6>" flowId="lcNBJHYU3XhHj29Ga4Q6" %}

### Default Configuration

#### Schedule Settings

| Setting           | Value                    | Explanation                                                                                            |
| ----------------- | ------------------------ | ------------------------------------------------------------------------------------------------------ |
| **Schedule Type** | `Standard`               | Ensures consistent monitoring of source freshness in production environment                            |
| **Schedule Name** | `source freshness check` | Descriptive name that indicates purpose                                                                |
| **Git Branch**    | `main`                   | Uses your default production branch to ensure you're checking against the latest source configurations |

#### 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

{% hint style="info" %}
For additional source freshness configurations, see [Source Freshness](/app-help/documentation/bolt/managing-schedules/analyzing-run-details/configuring-source-freshness.md) documentation.
{% endhint %}

#### 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)

{% hint style="info" %}
For custom Trigger configurations, see [Trigger Types](/app-help/documentation/bolt/creating-schedules/trigger-types.md) documentation.
{% endhint %}

#### 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

{% hint style="info" %}
For custom notification configurations, see [Notification Settings](/app-help/documentation/bolt/creating-schedules/notification-settings.md) documentation.
{% endhint %}

### 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`)
* **Add notification destinations** (Slack, MS Teams) for team collaboration


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paradime.io/app-help/documentation/bolt/creating-schedules/templates/dbt-tm-templates/snapshot-source-data-freshness.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
