Base interface#
Base file filter interface. |
|
|
Returns |
- class onetl.base.base_file_filter.BaseFileFilter#
Base file filter interface.
Filters used by several onETL components, including File Downloader and File Mover, to determine if a file should be handled or not.
All filters are stateless.
- abstract match(path: PathProtocol) bool #
Returns
True
if path is matching the filter,False
otherwiseExamples
from onetl.impl import LocalPath assert filter.match(LocalPath("/path/to/file.csv")) assert not filter.match(LocalPath("/path/to/excluded.csv")) assert filter.match(LocalPath("/path/to/file.csv"))