script to Unload Redshift table data to S3 bucket:
we can unload the data using 2 credential from Redshift to S3 bucket.
1)access key & secret key
2) ARN roles
UNLOAD ('SELECT * FROM DB_name.schema1.table2')
TO 's3://s3_bucket_name/table2.csv'
iam_role 'arn:aws:iam::123456789:role/s3_to_Redshift_load_bucket'
KMS_KEY_ID '123456789'
encrypted PARALLEL on
CSV;
s3_bucket_name--> s3 bucket name
ARN name --> iam_role 'arn:aws:iam::123456789:role/s3_to_Redshift_load_bucket
KMS_KEY_ID --> '123456789'
CSV --> format
No comments:
Post a Comment