The Unload command options extract data from Amazon Redshift and load data to staging files on Amazon S3 in a particular format. PowerExchange for Amazon Redshift supports ADDQUOTES, AWS_IAM_ROLE, DELIMITER, MAXFILESIZE, NULL, PARALLEL, and REGION unload command options.
To add options to the Unload command, use the
Unload Options
option. The ESCAPE option is set by default. You can set the following options:
ADDQUOTES
The Unload command can read data values that contain the delimiter. The Unload command adds quotation marks to each data field. If double quote (") is a part of data, use ESCAPE to read the double quote as a regular character.
Use the ADDQUOTES Unload command to read data that contains special characters.
AWS_IAM_ROLE
Specify the Amazon Redshift Role Resource Name (ARN) to run the session on Data Integration Service installed on an Amazon EC2 system in the following format:
A single ASCII character to separate fields in the input file. Default is \036, the octal representation of the non-printable character and the record separator.
You can use characters such as pipe (|), tilde (~), or a tab (\t). The delimiter you specify should not be a part of the data. If the delimiter is a part of data, use ESCAPE to read the delimiter character as a regular character.
MAXFILESIZE
You can use the MAXFILESIZE Unload command option to limit the size of the files unloaded from a Redshift table to Amazon S3.
Specify the value in decimals between 5 MB and 6.2 GB.
Enter the value of the MAXFILESIZE Unload command option in the following format:
MAXFILESIZE=50MB
.
NULL
You can use the NULL Unload command option to replace the null values in an Amazon Redshift source table with the string that you specify using the NULL Unload command option.
Enter the value of the NULL Unload command option in the following format:
NULL=text
. Do not add spaces when you enter the string value. For more information about the NULL Unload command, see the AWS documentation.
Applicable when you run a mapping in the native environment.
PARALLEL
The Unload command writes data in parallel to multiple files, according to the number of slices in the cluster. Default is On.
If you turn the Parallel option off, the Unload command writes data serially. The maximum size of a data file is 6.5 GB. Do not use
PARALLEL OFF
if you run a mapping on the Blaze engine.
REGION
You can use the REGION attribute when the Amazon S3 staging bucket is not in the same region as the cluster region. If Amazon Redshift resides in the US East (N. Virginia) region, you can use an Amazon S3 bucket residing in the Asia Pacific (Mumbai) region to create staging files. For example,