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
feita há 7 meses216 visualizações
2 Respostas
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
respondido há 6 meses
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
respondido há 6 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas