Skip to content

Commit

Permalink
Feat: warns as alerts (#127)
Browse files Browse the repository at this point in the history
* feat: warns as alerts

adds a new project variable to facilitate showing test warnings as alerts

* chore: formatting fix

fixes a line formatting to clean up diff
  • Loading branch information
famazak authored Apr 30, 2024
1 parent 542d816 commit 1951dfa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "re_data"
version: "0.11.0"
version: "0.12.0"
config-version: 2

require-dbt-version: [">=1.0.0", "<2.0.0"]
Expand All @@ -23,6 +23,7 @@ vars:
re_data:alerting_z_score: 3

re_data:save_test_history: false
re_data:show_warns_as_alerts: false

re_data:anomaly_detector:
name: modified_z_score
Expand Down
7 changes: 6 additions & 1 deletion models/alerts/re_data_alerts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ select
run_at as time_window_end

from {{ ref('re_data_test_history') }}
where status = 'Fail' or status = 'Error'
where
status = 'Fail'
or status = 'Error'
{% if var('re_data:show_warns_as_alerts') %}
or status = 'Warn'
{% endif %}

0 comments on commit 1951dfa

Please sign in to comment.