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

Method _to_proto_impl

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

Source from the content-addressed store, hash-verified

673 )
674
675 def _to_proto_impl(self) -> DataSourceProto:
676 schema_pb = []
677
678 if isinstance(self.schema, Dict):
679 for key, value in self.schema.items():
680 schema_pb.append(
681 Field(name=key, dtype=from_value_type(value.value)).to_proto()
682 )
683 else:
684 for field in self.schema:
685 schema_pb.append(field.to_proto())
686 data_source_proto = DataSourceProto(
687 name=self.name,
688 type=DataSourceProto.REQUEST_SOURCE,
689 description=self.description,
690 tags=self.tags,
691 owner=self.owner,
692 )
693 data_source_proto.timestamp_field = self.timestamp_field
694 data_source_proto.request_data_options.schema.extend(schema_pb)
695
696 return data_source_proto
697
698 def get_table_query_string(self) -> str:
699 raise NotImplementedError

Callers

nothing calls this directly

Calls 3

FieldClass · 0.90
from_value_typeFunction · 0.90
to_protoMethod · 0.45

Tested by

no test coverage detected