Skip to content

Commit b7ea5cc

Browse files
authored
fix: Push Source inherits the timestamp fields from Data Source (feast-dev#5550)
1 parent bdf20bb commit b7ea5cc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

sdk/python/feast/data_source.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,19 @@ def _to_proto_impl(self) -> DataSourceProto:
922922
owner=self.owner,
923923
)
924924

925+
# Only set timestamp fields if we have a batch source and this PushSource doesn't have its own fields
926+
if self.batch_source and not (
927+
self.timestamp_field or self.created_timestamp_column or self.field_mapping
928+
):
929+
data_source_proto.timestamp_field = self.batch_source.timestamp_field
930+
data_source_proto.created_timestamp_column = (
931+
self.batch_source.created_timestamp_column
932+
)
933+
data_source_proto.field_mapping.update(self.batch_source.field_mapping)
934+
data_source_proto.date_partition_column = (
935+
self.batch_source.date_partition_column
936+
)
937+
925938
if self.batch_source:
926939
data_source_proto.batch_source.MergeFrom(self.batch_source.to_proto())
927940

0 commit comments

Comments
 (0)