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

Method _to_proto_impl

sdk/python/feast/data_source.py:923–948  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

921 )
922
923 def _to_proto_impl(self) -> DataSourceProto:
924 data_source_proto = DataSourceProto(
925 name=self.name,
926 type=DataSourceProto.PUSH_SOURCE,
927 description=self.description,
928 tags=self.tags,
929 owner=self.owner,
930 )
931
932 # Only set timestamp fields if we have a batch source and this PushSource doesn't have its own fields
933 if self.batch_source and not (
934 self.timestamp_field or self.created_timestamp_column or self.field_mapping
935 ):
936 data_source_proto.timestamp_field = self.batch_source.timestamp_field
937 data_source_proto.created_timestamp_column = (
938 self.batch_source.created_timestamp_column
939 )
940 data_source_proto.field_mapping.update(self.batch_source.field_mapping)
941 data_source_proto.date_partition_column = (
942 self.batch_source.date_partition_column
943 )
944
945 if self.batch_source:
946 data_source_proto.batch_source.MergeFrom(self.batch_source.to_proto())
947
948 return data_source_proto
949
950 def get_table_query_string(self) -> str:
951 raise NotImplementedError

Callers

nothing calls this directly

Calls 2

updateMethod · 0.45
to_protoMethod · 0.45

Tested by

no test coverage detected