Skip to content

Commit

Permalink
✨ Add created timestamp for feature view
Browse files Browse the repository at this point in the history
Signed-off-by: Amom Mendes <amommendes@hotmail.com>
  • Loading branch information
amommendes committed Oct 17, 2021
1 parent 9cd9f74 commit 2a7f2b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sdk/python/feast/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from urllib.parse import urlparse

from google.protobuf.internal.containers import RepeatedCompositeFieldContainer
from google.protobuf.timestamp_pb2 import Timestamp
from proto import Message

from feast import importer
Expand Down Expand Up @@ -314,6 +315,10 @@ def apply_feature_view(
self._check_conflicting_feature_view_names(feature_view)
existing_feature_views_of_same_type: RepeatedCompositeFieldContainer
if isinstance(feature_view, FeatureView):
if not feature_view_proto.meta.HasField("created_timestamp"):
feature_view_proto.meta.created_timestamp = Timestamp.FromDatetime(
datetime.now()
)
existing_feature_views_of_same_type = (
self.cached_registry_proto.feature_views
)
Expand Down

0 comments on commit 2a7f2b0

Please sign in to comment.