Base interface#

BaseFileFilter()

Base file filter interface.

BaseFileFilter.match(path)

Returns True if path is matching the filter, False otherwise

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 otherwise

Examples

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"))