astronomer.providers.sftp.triggers.sftp

Module Contents

Classes

SFTPTrigger

This class is deprecated and will be removed in 2.0.0.

class astronomer.providers.sftp.triggers.sftp.SFTPTrigger(path, file_pattern='', sftp_conn_id='sftp_default', newer_than=None, poke_interval=5)[source]

Bases: airflow.triggers.base.BaseTrigger

This class is deprecated and will be removed in 2.0.0. Use :class: ~airflow.providers.sftp.triggers.sftp.SFTPTrigger instead.

serialize()[source]

Serializes SFTPTrigger arguments and classpath

async run()[source]

Makes a series of asynchronous calls to sftp servers via async sftp hook. It yields a Trigger

  • If file matching file pattern exists at the specified path return it,

  • If file pattern was not provided, it looks directly into the specific path which was provided.

  • If newer then datetime was provided it looks for the file path last modified time and check whether the last modified time is greater, if true return file if false it polls again.