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

Function prep_file_source

sdk/python/tests/utils/data_source_test_creator.py:14–23  ·  view source on GitHub ↗
(df, timestamp_field=None)

Source from the content-addressed store, hash-verified

12
13@contextlib.contextmanager
14def prep_file_source(df, timestamp_field=None) -> Iterator[FileSource]:
15 with tempfile.NamedTemporaryFile(suffix=".parquet") as f:
16 f.close()
17 df.to_parquet(f.name)
18 file_source = FileSource(
19 file_format=ParquetFormat(),
20 path=f.name,
21 timestamp_field=timestamp_field,
22 )
23 yield file_source
24
25
26def simple_bq_source_using_table_arg(df, timestamp_field=None) -> BigQuerySource:

Calls 3

FileSourceClass · 0.90
ParquetFormatClass · 0.90
closeMethod · 0.45

Tested by

no test coverage detected