Yang Xu
06/04/2026, 7:57 AMdbt_freshness = dbt_task_factory.get_task(
dag_id="freshness_run",
arguments=[
"dbt",
"source",
"freshness",
],
pool="dbt",
extra_env_vars=extra_env_vars,
)
if the freshness test fails on some models, will there be any alerts?kapa.ai
06/04/2026, 7:57 AMdbt source freshness alone is not enough to trigger Elementary alerts. You need additional steps after the freshness run.
What's Missing Elementary does not automatically capture dbt source freshness results unless you take one of the following approaches:
Option 1: dbt 1.8+ (recommended) Add this flag to your dbt_project.yml to enable automatic collection via on-run-end hooks:
flags:
source_freshness_run_project_hooks: True
Then run edr monitor after the freshness command. [Collect source freshness]
Option 2: dbt < 1.8 (or as a fallback) You must manually upload the results before monitoring:
dbt source freshness
edr run-operation upload-source-freshness --project-dir <path to your project>
edr monitor
[Collect source freshness]
Updated Airflow DAG Your DAG should be extended to include the upload and monitor steps, for example:
dbt_freshness >> upload_source_freshness >> edr_monitor
Where:
⢠upload_source_freshness runs edr run-operation upload-source-freshness --project-dir <path>
⢠edr_monitor runs edr monitor with your Slack/Teams configuration
> Note: dbt source freshness and upload-source-freshness must run on the same machine. [Teams alerts guide]
Also, by default Elementary only alerts on errors, not warnings. If you want warning-level freshness alerts too, add this to your `dbt_project.yml`:
vars:
disable_warn_alerts: false š 0 button š 0 button ā¹ļø Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.Yang Xu
06/04/2026, 8:07 AMedr monitor after the freshness command exactly?kapa.ai
06/04/2026, 8:08 AMedr monitor step after your freshness task in Airflow, using `BashOperator`:
from airflow.operators.bash_operator import BashOperator
upload_source_freshness = BashOperator(
task_id='upload_source_freshness',
bash_command=f"edr run-operation upload-source-freshness --project-dir {os.getenv('DBT_PROJECT_DIR')}"
)
edr_monitor = BashOperator(
task_id='elementary_monitor',
bash_command=f"edr monitor --profiles-dir {os.getenv('DBT_PROFILES_DIR')} --slack-token {os.getenv('SLACK_TOKEN')} --slack-channel-name {os.getenv('EDR_SLACK_CHANNEL')}"
)
dbt_freshness >> upload_source_freshness >> edr_monitor
The order matters: [Collect source freshness]
1. dbt source freshness ā runs the freshness checks
2. edr run-operation upload-source-freshness ā uploads the results to Elementary's tables
3. edr monitor ā reads the uploaded results and sends alerts
> Note: Steps 1 and 2 must run on the same machine. [Teams alerts guide]
Also make sure edr is installed in your Airflow worker environment:
pip install 'elementary-data[<your-warehouse>]'
[Airflow integration] š 0 button š 0 button ā¹ļø Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.