diff --git a/elementary/monitor/dbt_project/macros/alerts/population/test_alerts.sql b/elementary/monitor/dbt_project/macros/alerts/population/test_alerts.sql index 2ca471666..44e9c5fc6 100644 --- a/elementary/monitor/dbt_project/macros/alerts/population/test_alerts.sql +++ b/elementary/monitor/dbt_project/macros/alerts/population/test_alerts.sql @@ -25,6 +25,7 @@ 'column_name': raw_test_alert.column_name, 'test_type': test_type, 'test_sub_type': raw_test_alert.sub_type, + 'test_description': raw_test_alert.test_description, 'test_results_description': raw_test_alert.alert_description, 'owners': raw_test_alert.owners, 'tags': raw_test_alert.tags, @@ -143,6 +144,7 @@ failed_tests.status, failed_tests.result_rows, tests.meta as test_meta, + tests.description as test_description, artifacts_meta.meta as model_meta from failed_tests left join tests on failed_tests.test_unique_id = tests.unique_id diff --git a/elementary/monitor/fetchers/alerts/schema/alert_data.py b/elementary/monitor/fetchers/alerts/schema/alert_data.py index 33c296b87..f125b1249 100644 --- a/elementary/monitor/fetchers/alerts/schema/alert_data.py +++ b/elementary/monitor/fetchers/alerts/schema/alert_data.py @@ -130,6 +130,7 @@ class TestAlertDataSchema(BaseAlertDataSchema): column_name: Optional[str] = None test_type: str test_sub_type: str + test_description: Optional[str] = None test_results_description: Optional[str] = None test_results_query: Optional[str] = None test_rows_sample: Optional[List[Dict]] = None @@ -203,7 +204,7 @@ def format_alert( test_results_description=self.test_results_description, test_results_query=self.test_results_query, test_short_name=self.test_short_name, - test_description=self.description, + test_description=self.description or self.test_description, other=self.other, test_params=self.test_params, test_rows_sample=self.test_rows_sample if not disable_samples else None,