FileDataSource
laktory.models.datasources.FileDataSource
ยค
Bases: BaseDataSource
Data source using disk files, such as data events (json/csv) and dataframe parquets. It is generally used in the context of a data pipeline.
ATTRIBUTE | DESCRIPTION |
---|---|
format |
Format of the data files
TYPE:
|
header |
If
TYPE:
|
multiline |
If
TYPE:
|
read_options |
Other options passed to |
schema_location |
Path for files schema. If
TYPE:
|
Examples:
from laktory import models
source = models.FileDataSource(
path="/Volumes/sources/landing/events/yahoo-finance/stock_price",
format="JSON",
as_stream=False,
)
# df = source.read(spark)