From b4bb8c8527ebec7bc219777d525589e329ea811d Mon Sep 17 00:00:00 2001 From: Yihui Guo Date: Tue, 11 Oct 2022 20:30:15 +0800 Subject: [PATCH] Fix direct purview client missing transformation --- .../feathr/registry/_feature_registry_purview.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feathr_project/feathr/registry/_feature_registry_purview.py b/feathr_project/feathr/registry/_feature_registry_purview.py index 4ef05a690..c564e8796 100644 --- a/feathr_project/feathr/registry/_feature_registry_purview.py +++ b/feathr_project/feathr/registry/_feature_registry_purview.py @@ -1368,11 +1368,11 @@ def _get_transformation_from_dict(self, input: Dict) -> FeatureType: if 'transformExpr' in input: # it's ExpressionTransformation return ExpressionTransformation(input['transformExpr']) - elif 'def_expr' in input: - agg_expr=input['def_expr'] if 'def_expr' in input else None - agg_func=input['agg_func']if 'agg_func' in input else None + elif 'def_expr' in input or 'defExpr' in input: + agg_expr=input['def_expr'] if 'def_expr' in input else (input['defExpr'] if 'defExpr' in input else None) + agg_func=input['agg_func']if 'agg_func' in input else (input['aggFunc'] if 'aggFunc' in input else None) window=input['window']if 'window' in input else None - group_by=input['group_by']if 'group_by' in input else None + group_by=input['group_by']if 'group_by' in input else (input['groupBy'] if 'groupBy' in input else None) filter=input['filter']if 'filter' in input else None limit=input['limit']if 'limit' in input else None return WindowAggTransformation(agg_expr, agg_func, window, group_by, filter, limit)