I've code which extracts data from redshift to S3
UNLOAD ('
select sysdate
')
TO 's3://test-bucket/adretarget/test.csv' CREDENTIALS 'aws_access_key_id=ABCDE;aws_secret_access_key=12345'
ALLOWOVERWRITE
delimiter ','
PARALLEL OFF ;It works ok, however all my files end .csv000 is there a way to exclude the 000 so they just end.csv
Thanks
21 Answer
UNLOAD ('
select sysdate
')
TO 's3://test-bucket/adretarget/test' CREDENTIALS 'aws_access_key_id=ABCDE;aws_secret_access_key=12345'
ALLOWOVERWRITE
delimiter ','
PARALLEL OFF ;
There is no need to add the .csv extension in your unload file name. You can just mention 'test' and it will unload your data without extension, but the file will still be comma separated, which is csv.