By using AWS re:Post, you agree to the Terms of Use

Redshift UNLOAD questions

0

I’ve checked the documentation and searched the Internet (thought my GooFu is weak here ) but I can’t find an answer to my customer’s questions below – is there some information somewhere I’m missing?, alternatively can you shed light on their questions? - These are questions around the UNLOAD statement:

  1.   When using the UNLOAD, how are various column types converted to strings? Specifically how are Booleans, dates, and timestamps (with and without timezones) converted?
    
  2.   Any gotchas around UNLOAD encryption (AES256-GCM) with third-party decryption libraries/tools? Do we have sample code/tool usage?
    
  3.   What are the line endings for manifest files? Does the final line have one?
    
  4.   Is there a resource listing ways in which the UNLOAD statement may fail?
    

Any insights will be gratefully received.

asked 6 years ago29 views
1 Answer
0
Accepted Answer

Please see below answers to your questions:

  1. Since unload uses SELECT statement to get data, the data type conversions are like what happen in normal SELECT output shown on screen. Customer can perform type casting in SELECT statement used with UNLOAD for conversions needed.

  2. As per Redshift documentation[1] UNLOAD does not support Amazon S3 server-side encryption with a customer-supplied key (SSE-C).

  3. Manifest file created by UNLOAD is a JSON file, so JSON format is used and JSON notations are used for beginning and end of records in it.

  4. Refer Redshift usage notes[1] has some of failure conditions in UNLOAD.

Apart from above mentioned points you are recommended to check the UNLOAD documentation[3] for more details.

[1] http://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html [2] http://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html#unload-usage-notes [3] http://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD_command_examples.html

answered 6 years 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