Skip to content

Commit

Permalink
Fix duplicate feature key bug (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
YihuiGuo committed Aug 23, 2022
1 parent 38f2138 commit 73656fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions feathr_project/feathr/registry/_feature_registry_purview.py
Original file line number Diff line number Diff line change
Expand Up @@ -1381,9 +1381,9 @@ def _get_features_by_guid_or_entities(self, guid_list, entity_list) -> List[Feat
feature_list=[]
key_list = []
for feature_entity in feature_entities:
for key in feature_entity["attributes"]["key"]:
key_list.append(TypedKey(key_column=key["keyColumn"], key_column_type=key["keyColumnType"], full_name=key["fullName"], description=key["description"], key_column_alias=key["keyColumnAlias"]))

first_key = feature_entity["attributes"]["key"][0]
key_list = [TypedKey(key_column=first_key["keyColumn"], key_column_type=first_key["keyColumnType"], full_name=first_key["fullName"], description=first_key["description"], key_column_alias=first_key["keyColumnAlias"])]
# after get keys, put them in features
feature_list.append(Feature(name=feature_entity["attributes"]["name"],
feature_type=self._get_feature_type_from_hocon(feature_entity["attributes"]["type"]), # stored as a hocon string, can be parsed using pyhocon
Expand Down

0 comments on commit 73656fe

Please sign in to comment.