From 0616ac3799f121d0f6d0699fd288c35fc5cb1a6f Mon Sep 17 00:00:00 2001 From: "Wei-Chun, Chang" Date: Mon, 4 Sep 2023 16:53:26 +0800 Subject: [PATCH] Skip non-supported calculation method Signed-off-by: Wei-Chun, Chang --- piperider_cli/dbtutil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piperider_cli/dbtutil.py b/piperider_cli/dbtutil.py index c6fca80fa..52ace7433 100644 --- a/piperider_cli/dbtutil.py +++ b/piperider_cli/dbtutil.py @@ -513,10 +513,10 @@ def _create_metric(name, filter=None, alias=None): f"Dimension of foreign entities is not supported.") statistics.add_field_one('nosupport') return None - if m.calculation_method == 'median': + if m.calculation_method in ['sum_boolean', 'count_distinct', 'median', 'percentile']: console.print( f"[[bold yellow]Skip[/bold yellow]] Metric '{metric.get('name')}'. " - f"Aggregation type 'median' is not supported.") + f"Aggregation type '{m.calculation_method}' is not supported.") statistics.add_field_one('nosupport') return None