airflow.providers.sftp.sensors.sftp¶
This module contains SFTP sensor.
Classes¶
Waits for a file or directory to be present on SFTP. |
Module Contents¶
- class airflow.providers.sftp.sensors.sftp.SFTPSensor(*, path, file_pattern='', newer_than=None, sftp_conn_id='sftp_default', python_callable=None, op_args=None, op_kwargs=None, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]¶
Bases:
airflow.providers.sftp.version_compat.BaseSensorOperator
Waits for a file or directory to be present on SFTP.
- Parameters:
path (str) – Remote file or directory path
file_pattern (str) – The pattern that will be used to match the file (fnmatch format)
sftp_conn_id (str) – The connection to run the sensor against
newer_than (datetime.datetime | str | None) – DateTime for which the file or file path should be newer than, comparison is inclusive
deferrable (bool) – If waiting for completion, whether to defer the task until done, default is
False
.
- template_fields: collections.abc.Sequence[str] = ('path', 'newer_than')[source]¶
- hook: airflow.providers.sftp.hooks.sftp.SFTPHook | None = None[source]¶
- newer_than: datetime.datetime | str | None = None[source]¶
- python_callable: collections.abc.Callable | None = None[source]¶