Module Contents

class airflow.providers.ftp.sensors.ftp.FTPSensor(*, path: str, ftp_conn_id: str = 'ftp_default', fail_on_transient_errors: bool = True, **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Waits for a file or directory to be present on FTP.

  • path (str) -- Remote file or directory path

  • fail_on_transient_errors (bool) -- Fail on all errors, including 4xx transient errors. Default True.

  • ftp_conn_id (str) -- The ftp connection id reference to run the sensor against.

template_fields = ['path'][source]

Errors that are transient in nature, and where action can be retried

transient_errors = [421, 425, 426, 434, 450, 451, 452][source]

Return connection hook.

_get_error_code(self, e)[source]

Extract error code from ftp exception

poke(self, context: dict)[source]
class airflow.providers.ftp.sensors.ftp.FTPSSensor[source]

Bases: airflow.providers.ftp.sensors.ftp.FTPSensor

Waits for a file or directory to be present on FTP over SSL.


Return connection hook.

Was this entry helpful?