diff --git a/models/edr/alerts/alerts_anomaly_detection.sql b/models/edr/alerts/alerts_anomaly_detection.sql index 3adaf47ba..104e6aaf8 100644 --- a/models/edr/alerts/alerts_anomaly_detection.sql +++ b/models/edr/alerts/alerts_anomaly_detection.sql @@ -31,10 +31,13 @@ alerts_anomaly_detection as ( test_short_name, test_params, severity, - status, + lower(status) as status, result_rows from elementary_test_results - where {{ not elementary.get_config_var('disable_test_alerts') }} and lower(status) != 'pass' {%- if elementary.get_config_var('disable_warn_alerts') -%} and lower(status) != 'warn' {%- endif -%} {%- if elementary.get_config_var('disable_skipped_test_alerts') -%} and lower(status) != 'skipped' {%- endif -%} and test_type = 'anomaly_detection' + where {{ not elementary.get_config_var('disable_test_alerts') }} + {%- if elementary.get_config_var('disable_warn_alerts') -%} and lower(status) != 'warn' {%- endif -%} + {%- if elementary.get_config_var('disable_skipped_test_alerts') -%} and lower(status) != 'skipped' {%- endif -%} + and test_type = 'anomaly_detection' ) select * from alerts_anomaly_detection \ No newline at end of file diff --git a/models/edr/alerts/alerts_dbt_tests.sql b/models/edr/alerts/alerts_dbt_tests.sql index 95dce1c52..9e3632c4d 100644 --- a/models/edr/alerts/alerts_dbt_tests.sql +++ b/models/edr/alerts/alerts_dbt_tests.sql @@ -31,10 +31,13 @@ alerts_dbt_tests as ( test_short_name, test_params, severity, - status, + lower(status) as status, result_rows from elementary_test_results - where {{ not elementary.get_config_var('disable_test_alerts') }} and lower(status) != 'pass' {%- if elementary.get_config_var('disable_warn_alerts') -%} and lower(status) != 'warn' {%- endif -%} {%- if elementary.get_config_var('disable_skipped_test_alerts') -%} and lower(status) != 'skipped' {%- endif -%} and test_type = 'dbt_test' + where {{ not elementary.get_config_var('disable_test_alerts') }} + {%- if elementary.get_config_var('disable_warn_alerts') -%} and lower(status) != 'warn' {%- endif -%} + {%- if elementary.get_config_var('disable_skipped_test_alerts') -%} and lower(status) != 'skipped' {%- endif -%} + and test_type = 'dbt_test' ) select * from alerts_dbt_tests diff --git a/models/edr/alerts/alerts_schema_changes.sql b/models/edr/alerts/alerts_schema_changes.sql index b508bedcf..64a4b73e3 100644 --- a/models/edr/alerts/alerts_schema_changes.sql +++ b/models/edr/alerts/alerts_schema_changes.sql @@ -32,10 +32,13 @@ alerts_schema_changes as ( test_short_name, test_params, severity, - status, + lower(status) as status, result_rows from elementary_test_results - where {{ not elementary.get_config_var('disable_test_alerts') }} and lower(status) != 'pass' {%- if elementary.get_config_var('disable_warn_alerts') -%} and lower(status) != 'warn' {%- endif -%} {%- if elementary.get_config_var('disable_skipped_test_alerts') -%} and lower(status) != 'skipped' {%- endif -%} and test_type = 'schema_change' + where {{ not elementary.get_config_var('disable_test_alerts') }} + {%- if elementary.get_config_var('disable_warn_alerts') -%} and lower(status) != 'warn' {%- endif -%} + {%- if elementary.get_config_var('disable_skipped_test_alerts') -%} and lower(status) != 'skipped' {%- endif -%} + and test_type = 'schema_change' ) select * from alerts_schema_changes \ No newline at end of file