MCPcopy Create free account
hub / github.com/feast-dev/feast / from_proto

Method from_proto

sdk/python/feast/infra/offline_stores/file_source.py:126–138  ·  view source on GitHub ↗
(data_source: DataSourceProto)

Source from the content-addressed store, hash-verified

124
125 @staticmethod
126 def from_proto(data_source: DataSourceProto):
127 return FileSource(
128 name=data_source.name,
129 field_mapping=dict(data_source.field_mapping),
130 file_format=FileFormat.from_proto(data_source.file_options.file_format),
131 path=data_source.file_options.uri,
132 timestamp_field=data_source.timestamp_field,
133 created_timestamp_column=data_source.created_timestamp_column,
134 s3_endpoint_override=data_source.file_options.s3_endpoint_override,
135 description=data_source.description,
136 tags=dict(data_source.tags),
137 owner=data_source.owner,
138 )
139
140 def _to_proto_impl(self) -> DataSourceProto:
141 data_source_proto = DataSourceProto(

Callers 2

from_protoMethod · 0.45
from_protoMethod · 0.45

Calls 1

FileSourceClass · 0.90

Tested by

no test coverage detected