@@ -71,6 +71,10 @@ class TableGroupSummary(EntityMinimal):
7171 monitor_schema_anomalies : int | None
7272 monitor_volume_anomalies : int | None
7373 monitor_metric_anomalies : int | None
74+ monitor_freshness_has_errors : bool | None
75+ monitor_volume_has_errors : bool | None
76+ monitor_schema_has_errors : bool | None
77+ monitor_metric_has_errors : bool | None
7478 monitor_freshness_is_training : bool | None
7579 monitor_volume_is_training : bool | None
7680 monitor_metric_is_training : bool | None
@@ -266,6 +270,10 @@ def select_summary(cls, project_code: str, for_dashboard: bool = False) -> Itera
266270 SUM(CASE WHEN results.test_type = 'Schema_Drift' AND results.result_code = 0 THEN 1 ELSE 0 END) AS schema_anomalies,
267271 SUM(CASE WHEN results.test_type = 'Volume_Trend' AND results.result_code = 0 THEN 1 ELSE 0 END) AS volume_anomalies,
268272 SUM(CASE WHEN results.test_type = 'Metric_Trend' AND results.result_code = 0 THEN 1 ELSE 0 END) AS metric_anomalies,
273+ BOOL_OR(results.result_status = 'Error') FILTER (WHERE results.test_type = 'Freshness_Trend' AND ranked_test_runs.position = 1) AS freshness_has_errors,
274+ BOOL_OR(results.result_status = 'Error') FILTER (WHERE results.test_type = 'Volume_Trend' AND ranked_test_runs.position = 1) AS volume_has_errors,
275+ BOOL_OR(results.result_status = 'Error') FILTER (WHERE results.test_type = 'Schema_Drift' AND ranked_test_runs.position = 1) AS schema_has_errors,
276+ BOOL_OR(results.result_status = 'Error') FILTER (WHERE results.test_type = 'Metric_Trend' AND ranked_test_runs.position = 1) AS metric_has_errors,
269277 BOOL_AND(results.result_code = -1) FILTER (WHERE results.test_type = 'Freshness_Trend' AND ranked_test_runs.position = 1) AS freshness_is_training,
270278 BOOL_AND(results.result_code = -1) FILTER (WHERE results.test_type = 'Volume_Trend' AND ranked_test_runs.position = 1) AS volume_is_training,
271279 BOOL_AND(results.result_code = -1) FILTER (WHERE results.test_type = 'Metric_Trend' AND ranked_test_runs.position = 1) AS metric_is_training,
@@ -319,6 +327,10 @@ def select_summary(cls, project_code: str, for_dashboard: bool = False) -> Itera
319327 monitor_tables.schema_anomalies AS monitor_schema_anomalies,
320328 monitor_tables.volume_anomalies AS monitor_volume_anomalies,
321329 monitor_tables.metric_anomalies AS monitor_metric_anomalies,
330+ monitor_tables.freshness_has_errors AS monitor_freshness_has_errors,
331+ monitor_tables.volume_has_errors AS monitor_volume_has_errors,
332+ monitor_tables.schema_has_errors AS monitor_schema_has_errors,
333+ monitor_tables.metric_has_errors AS monitor_metric_has_errors,
322334 monitor_tables.freshness_is_training AS monitor_freshness_is_training,
323335 monitor_tables.volume_is_training AS monitor_volume_is_training,
324336 monitor_tables.metric_is_training AS monitor_metric_is_training,
0 commit comments