airflow.contrib.operators.sftp_to_s3_operator

Module Contents

class airflow.contrib.operators.sftp_to_s3_operator.SFTPToS3Operator(s3_bucket, s3_key, sftp_path, sftp_conn_id='ssh_default', s3_conn_id='aws_default', *args, **kwargs)[source]

Bases: airflow.models.BaseOperator

This operator enables the transferring of files from a SFTP server to Amazon S3.

Parameters
  • sftp_conn_id (string) – The sftp connection id. The name or identifier for establishing a connection to the SFTP server.

  • sftp_path (string) – The sftp remote path. This is the specified file path for downloading the file from the SFTP server.

  • s3_conn_id (string) – The s3 connection id. The name or identifier for establishing a connection to S3

  • s3_bucket (string) – The targeted s3 bucket. This is the S3 bucket to where the file is uploaded.

  • s3_key (string) – The targeted s3 key. This is the specified path for uploading the file to S3.

template_fields = ['s3_key', 'sftp_path'][source]
static get_s3_key(s3_key)[source]

This parses the correct format for S3 keys regardless of how the S3 url is passed.

execute(self, context)[source]

Was this entry helpful?