Base interface¶
BaseFileFilter
¶
Base file filter interface.
Filters used by several onETL components, including onetl.file.file_downloader.file_downloader.FileDownloader and onetl.file.file_mover.file_mover.FileMover, to determine if a file should be handled or not.
All filters are stateless.
Added in 0.8.0
match(path)
¶
Returns True if path is matching the filter, False otherwise
Added in 0.8.0
Examples:
>>> from onetl.impl import LocalPath
>>> filter.match(LocalPath("/path/to/file.csv"))
True
>>> filter.match(LocalPath("/path/to/excluded.csv"))
False
>>> filter.match(LocalPath("/path/to/file.csv"))
True