MCPcopy Index your code
hub / github.com/feast-dev/feast / delete_feature_view

Method delete_feature_view

sdk/python/feast/infra/registry/sql.py:604–635  ·  view source on GitHub ↗
(self, name: str, project: str, commit: bool = True)

Source from the content-addressed store, hash-verified

602 )
603
604 def delete_feature_view(self, name: str, project: str, commit: bool = True):
605 with self.write_engine.begin() as conn:
606 deleted_count = 0
607 for table in {
608 feature_views,
609 on_demand_feature_views,
610 stream_feature_views,
611 label_views,
612 }:
613 stmt = delete(table).where(
614 table.c.feature_view_name == name,
615 table.c.project_id == project,
616 )
617 rows = conn.execute(stmt)
618 deleted_count += rows.rowcount
619 if deleted_count == 0:
620 raise FeatureViewNotFoundException(name, project)
621 # Clean up version history in the same transaction
622 stmt = delete(feature_view_version_history).where(
623 feature_view_version_history.c.feature_view_name == name,
624 feature_view_version_history.c.project_id == project,
625 )
626 conn.execute(stmt)
627
628 self.apply_project(
629 self.get_project(name=project, allow_cache=False), commit=True
630 )
631 if not self.purge_feast_metadata:
632 with self.write_engine.begin() as conn:
633 self._set_last_updated_metadata(_utc_now(), project, conn)
634 if self.cache_mode == "sync":
635 self.refresh()
636
637 def delete_feature_service(self, name: str, project: str, commit: bool = True):
638 return self._delete_object(

Callers 1

apply_diff_to_registryFunction · 0.45

Calls 8

apply_projectMethod · 0.95
_utc_nowFunction · 0.90
deleteFunction · 0.85
executeMethod · 0.45
get_projectMethod · 0.45
refreshMethod · 0.45

Tested by

no test coverage detected