airflow.triggers.file

Module Contents

Classes

FileTrigger

A trigger that fires exactly once after it finds the requested file or folder.

class airflow.triggers.file.FileTrigger(filepath, recursive=False, poke_interval=5.0, **kwargs)[source]

Bases: airflow.triggers.base.BaseTrigger

A trigger that fires exactly once after it finds the requested file or folder.

Parameters
  • filepath (str) – File or folder name (relative to the base path set within the connection), can be a glob.

  • recursive (bool) – when set to True, enables recursive directory matching behavior of ** in glob filepath parameter. Defaults to False.

  • poke_interval (float) – Time that the job should wait in between each try

serialize()[source]

Serialize FileTrigger arguments and classpath.

async run()[source]

Loop until the relevant files are found.

Was this entry helpful?