Skip to content

Commit

Permalink
Add on demand feature views deletion (feast-dev#2203)
Browse files Browse the repository at this point in the history
Signed-off-by: corentinmarek <corentin.marek@gmail.com>
  • Loading branch information
corentinmarek authored Jan 7, 2022
1 parent 4c32d75 commit 30f7bba
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sdk/python/feast/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,18 @@ def delete_feature_view(self, name: str, project: str, commit: bool = True):
self.commit()
return

for idx, existing_on_demand_feature_view_proto in enumerate(
self.cached_registry_proto.on_demand_feature_views
):
if (
existing_on_demand_feature_view_proto.spec.name == name
and existing_on_demand_feature_view_proto.spec.project == project
):
del self.cached_registry_proto.on_demand_feature_views[idx]
if commit:
self.commit()
return

raise FeatureViewNotFoundException(name, project)

def delete_entity(self, name: str, project: str, commit: bool = True):
Expand Down

0 comments on commit 30f7bba

Please sign in to comment.