airflow.providers.sftp.sensors.sftp

This module contains SFTP sensor.

Module Contents

Classes

SFTPSensor

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

class airflow.providers.sftp.sensors.sftp.SFTPSensor(*, path, file_pattern='', newer_than=None, sftp_conn_id='sftp_default', **kwargs)[source]

Bases: airflow.sensors.base.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 (Optional[datetime.datetime]) -- DateTime for which the file or file path should be newer than, comparison is inclusive

template_fields :Sequence[str] = ['path', 'newer_than'][source]
poke(self, context)[source]

Function that the sensors defined while deriving this class should override.

Was this entry helpful?