FileSensor

Apache Airflow Certified

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

View on GitHub

Last Updated: Nov. 10, 2022

Access Instructions

Install the Apache Airflow provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

fs_conn_idreference to the File (path) connection id
filepathRequiredFile or folder name (relative to the base path set within the connection), can be a glob.
recursivewhen set to True, enables recursive directory matching behavior of ** in glob filepath parameter. Defaults to False.

Documentation

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

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)

See also

For more information on how to use this sensor, take a look at the guide: FileSensor

Was this page helpful?