airflow.providers.amazon.aws.transfers.s3_to_ftp¶
Classes¶
This operator enables the transferring of files from S3 to a FTP server. |
Module Contents¶
- class airflow.providers.amazon.aws.transfers.s3_to_ftp.S3ToFTPOperator(*, s3_bucket, s3_key, ftp_path, s3_filenames=None, ftp_filenames=None, aws_conn_id='aws_default', ftp_conn_id='ftp_default', fail_on_file_not_exist=True, **kwargs)[source]¶
Bases:
airflow.providers.common.compat.sdk.BaseOperatorThis operator enables the transferring of files from S3 to a FTP server.
See also
For more information on how to use this operator, take a look at the guide: Amazon S3 To FTP transfer operator
- Parameters:
s3_bucket – The targeted s3 bucket. This is the S3 bucket from where the file is downloaded.
s3_key – The targeted s3 key. For a single file it must include the file path. For multiple files it is the key prefix (directory) and must end with
"/".s3_filenames (str | list[str] | None) – Only used if you want to move multiple files. You can pass a list with exact key suffixes present under the s3_key prefix, or a string prefix that all filenames must match. Use
"*"to move all objects under the s3_key prefix.ftp_path – The ftp remote path. For a single file it must include the file path. For multiple files it is the destination directory path and must end with
"/".ftp_filenames (str | list[str] | None) – Only used if you want to move multiple files and name them differently at the destination. It can be a list of filenames or a string prefix that replaces the s3 prefix.
aws_conn_id – reference to a specific AWS connection
ftp_conn_id – The ftp connection id. The name or identifier for establishing a connection to the FTP server.
fail_on_file_not_exist (bool) – If True, operator fails when a source S3 key does not exist. If False, the operator logs a warning and skips the transfer. Default is True.
- template_fields: collections.abc.Sequence[str] = ('s3_bucket', 's3_key', 'ftp_path', 's3_filenames', 'ftp_filenames')[source]¶