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.

preguntada hace 8 años598 visualizaciones
1 Respuesta
0
Respuesta aceptada

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

AWS
respondido hace 7 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas