(data_source: DataSourceProto)
| 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( |
no test coverage detected