File Mover Options#

pydantic model onetl.file.file_mover.options.FileMoverOptions#

File moving options

field if_exists: FileExistBehavior = FileExistBehavior.ERROR (alias 'mode')#

How to handle existing files in the local directory.

Possible values:
  • error (default) - do nothing, mark file as failed

  • ignore - do nothing, mark file as ignored

  • replace_file - replace existing file with a new one

  • replace_entire_directory - delete directory content before moving files

field workers: int = 1#

Number of workers to create for parallel file moving.

1 (default) means files will me moved sequentially. 2 or more means files will be moved in parallel workers.

Recommended value is min(32, os.cpu_count() + 4), e.g. 5.