Amazon Redshift to Amazon S3

Use the RedshiftToS3Operator transfer to copy the data from an Amazon Redshift table into an Amazon Simple Storage Service (S3) file.

Prerequisite Tasks

To use these operators, you must do a few things:

Operators

Amazon Redshift To Amazon S3 transfer operator

This operator loads data from an Amazon Redshift table to an existing Amazon S3 bucket.

To get more information about this operator visit: RedshiftToS3Operator

Example usage:

tests/system/providers/amazon/aws/example_redshift_s3_transfers.py[source]

transfer_redshift_to_s3 = RedshiftToS3Operator(
    task_id="transfer_redshift_to_s3",
    redshift_conn_id=conn_id_name,
    s3_bucket=bucket_name,
    s3_key=S3_KEY,
    schema="PUBLIC",
    table=REDSHIFT_TABLE,
)

You can find more information to the UNLOAD command used here.

Was this entry helpful?