1

I have table stored in redshift.I want to share data with my colleagues in excel format for s3 bucket. I know how to share in csv format but not excel format. Please help.

3 Answers 3

1

Amazon Redshift only UNLOADs in CSV or Parquet format.

Excel can open CSV files.

If you want the files in Excel format, you will need 'something' to do the conversion. This could be a Python program, an SQL client, or probably many other options. However, S3 will not do it for you.

Sign up to request clarification or add additional context in comments.

Comments

1

This can be done via a Lambda function that you program. You can use the Redshift data client to read the data from a Redshift table. In your Lambda function, you can write the data to an Excel file using an Excel API such as Apache POI. Then use the Amazon S3 API to write the Excel file to an Amazon S3 bucket.

Comments

0

Piggyback on John's answer, here is what worked for me:

UNLOAD ($$ SELECT * FROM your_table $$) TO 's3://xx/xxx/result.csv' iam_role 'xxx' ALLOWOVERWRITE ; 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.