spark-redshift
spark-redshift copied to clipboard
Support unload to tempdir with specified KMS key
Problem
Redshift natively encrypts UNLOAD-ed files, however it also supports server-side encryption using a specified AWS KMS key by adding the following clause to the query: KMS_KEY_ID '<KEY>' ENCRYPTED.
Solution
Add an optional parameter kms_key_id that is passed to the UNLOAD query in RedshiftRelation.scala.