feast) FileSource 사용 방법(여러개 파일)

2022. 10. 18. 23:11분석 Python/Packages

  • FileSource를 하기 위해서는 timestamp_field를 설정해야 함
  • 다중 파일들을 커버하기 위해서는 *.parquet 으로 해야함.

 

0.26 버전임

class FileSource(DataSource):
    def __init__(
        self,
        *,
        path: str,
        name: Optional[str] = "",
        event_timestamp_column: Optional[str] = "",
        file_format: Optional[FileFormat] = None,
        created_timestamp_column: Optional[str] = "",
        field_mapping: Optional[Dict[str, str]] = None,
        s3_endpoint_override: Optional[str] = None,
        description: Optional[str] = "",
        tags: Optional[Dict[str, str]] = None,
        owner: Optional[str] = "",
        timestamp_field: Optional[str] = "",
    ):

 

zipcode_batch_source = FileSource(
    name="zipcode",
    path="/home/zipcode_table*.parquet",
    timestamp_field="event_timestamp",
    event_timestamp_column="event_timestamp",
    created_timestamp_column="created_timestamp",
)

 

 

 

https://github.com/feast-dev/feast/issues/3058

 

How can I load multiple files using FileSource · Issue #3058 · feast-dev/feast

Expected Behavior I want to read parquet files in dir use FileSource function Current Behavior only one file read possible code path: Optional[str] = None, Steps to reproduce none Specifications Ve...

github.com

 

728x90