'Unload Redshift data to S3 in parquet format

I'm trying to unload redshift data to S3, but it's unloading in CSV format. How can unload the Redshift table to S3 bucket in parquet format using Java?



Solution 1:[1]

https://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html

unload ('select * from lineitem') to 's3://mybucket/lineitem/' iam_role 'arn:aws:iam::0123456789012:role/MyRedshiftRole' PARQUET PARTITION BY (l_shipdate);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SimonB