Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate feature key bug #601

Merged
merged 1 commit into from
Aug 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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