astronomer.providers.core.sensors.filesystem

Classes

FileSensorAsync

Waits for a file or folder to land in a filesystem using async.

Module Contents

class astronomer.providers.core.sensors.filesystem.FileSensorAsync(*args, **kwargs)[source]

Bases: airflow.sensors.filesystem.FileSensor

Waits for a file or folder to land in a filesystem using async.

If the path given is a directory then this sensor will only return true if any files exist inside it (either directly, or within a subdirectory)

Parameters:
  • fs_conn_id – reference to the File (path)

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

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

is_deprecated = True
post_deprecation_replacement = 'from airflow.sensors.filesystem import FileSensor'
execute(context)[source]

Airflow runs this method on the worker and defers using the trigger.

execute_complete(context, event=None)[source]

Callback for when the trigger fires - returns immediately. Relies on trigger to throw an exception, otherwise it assumes execution was successful.