MCPcopy
hub / github.com/feast-dev/feast / apply_materialization

Method apply_materialization

sdk/python/feast/infra/registry/sql.py:1056–1084  ·  view source on GitHub ↗
(
        self,
        feature_view: Union[FeatureView, OnDemandFeatureView, LabelView],
        project: str,
        start_date: datetime,
        end_date: datetime,
        commit: bool = True,
    )

Source from the content-addressed store, hash-verified

1054 )
1055
1056 def apply_materialization(
1057 self,
1058 feature_view: Union[FeatureView, OnDemandFeatureView, LabelView],
1059 project: str,
1060 start_date: datetime,
1061 end_date: datetime,
1062 commit: bool = True,
1063 ):
1064 table = self._infer_fv_table(feature_view)
1065 python_class, proto_class = self._infer_fv_classes(feature_view)
1066
1067 if python_class in {OnDemandFeatureView, LabelView}:
1068 raise ValueError(
1069 f"Cannot apply materialization for feature {feature_view.name} of type {python_class}"
1070 )
1071 fv: Union[FeatureView, StreamFeatureView] = self._get_object(
1072 table,
1073 feature_view.name,
1074 project,
1075 proto_class,
1076 python_class,
1077 "feature_view_name",
1078 "feature_view_proto",
1079 FeatureViewNotFoundException,
1080 )
1081 fv.materialization_intervals.append((start_date, end_date))
1082 self._apply_object(
1083 table, project, "feature_view_name", fv, "feature_view_proto"
1084 )
1085
1086 def delete_validation_reference(self, name: str, project: str, commit: bool = True):
1087 self._delete_object(

Callers 3

materializeMethod · 0.45
ApplyMaterializationMethod · 0.45

Calls 4

_infer_fv_tableMethod · 0.95
_infer_fv_classesMethod · 0.95
_get_objectMethod · 0.95
_apply_objectMethod · 0.95

Tested by

no test coverage detected