Skip to content

Commit 1bd2d88

Browse files
committed
test description in alerts bug in dbt 1.9
1 parent e56a0d7 commit 1bd2d88

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

elementary/monitor/dbt_project/macros/alerts/population/test_alerts.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
'column_name': raw_test_alert.column_name,
2626
'test_type': test_type,
2727
'test_sub_type': raw_test_alert.sub_type,
28+
'test_description': raw_test_alert.test_description,
2829
'test_results_description': raw_test_alert.alert_description,
2930
'owners': raw_test_alert.owners,
3031
'tags': raw_test_alert.tags,
@@ -143,6 +144,7 @@
143144
failed_tests.status,
144145
failed_tests.result_rows,
145146
tests.meta as test_meta,
147+
tests.description as test_description,
146148
artifacts_meta.meta as model_meta
147149
from failed_tests
148150
left join tests on failed_tests.test_unique_id = tests.unique_id

elementary/monitor/fetchers/alerts/schema/alert_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ class TestAlertDataSchema(BaseAlertDataSchema):
130130
column_name: Optional[str] = None
131131
test_type: str
132132
test_sub_type: str
133+
test_description: Optional[str] = None
133134
test_results_description: Optional[str] = None
134135
test_results_query: Optional[str] = None
135136
test_rows_sample: Optional[List[Dict]] = None
@@ -203,7 +204,7 @@ def format_alert(
203204
test_results_description=self.test_results_description,
204205
test_results_query=self.test_results_query,
205206
test_short_name=self.test_short_name,
206-
test_description=self.description,
207+
test_description=self.description or self.test_description,
207208
other=self.other,
208209
test_params=self.test_params,
209210
test_rows_sample=self.test_rows_sample if not disable_samples else None,

0 commit comments

Comments
 (0)