EXTENSION property on Redshift UNLOAD not working as expected

0

Running a basic UNLOAD (docs) query from redshift like the one below:

unload('select id, name from schema.table_name where col = X')
to 's3://bucket-name/files/return_<uuid>'
iam_role 'arn:aws:iam::XXXXXXXXXXXX:role/some-iam-role'
EXTENSION 'csv'
PARALLEL OFF
NULL AS ''
DELIMITER ','
HEADER
FORMAT CSV

Given this query, I would expect the resulting file to have the following key:

s3://bucket-name/files/return_<uuid>000.csv

But about 50% of the time, the .csv extension is not added, and I get a file with this key:

s3://bucket-name/files/return_<uuid>000

Any ideas what could be wrong?

Simon
asked 6 months ago207 views
2 Answers
0

Extension parameter is a feature that was Released on** January 20, 2023** It adds a file extension parameter to the UNLOAD command, so file extensions are automatically added to filenames.It supports version 1.0.45698 and above . Please check to ensure that the version you are using is supported Cluster Versions for Amazon Redshift

AWS
answered 6 months ago
0

We are aware of that, we are now running Redshift 1.0.59596, and the issue is still present. The EXTENSION property works for about half the time, but still fails frequently. Without any errors to be seen.

Simon
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions