Skip to content

Commit

Permalink
Enable use of "extension" argument to Redshift unload (#871)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinweisgrau authored Sep 7, 2023
1 parent fce51b0 commit b6f9dd8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions parsons/databases/redshift/redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ def unload(
allow_overwrite=True,
parallel=True,
max_file_size="6.2 GB",
extension=None,
aws_region=None,
aws_access_key_id=None,
aws_secret_access_key=None,
Expand Down Expand Up @@ -757,6 +758,8 @@ def unload(
max_file_size: str
The maximum size of files UNLOAD creates in Amazon S3. Specify a decimal value between
5 MB and 6.2 GB.
extension: str
This extension will be added to the end of file names loaded to S3
region: str
The AWS Region where the target Amazon S3 bucket is located. REGION is required for
UNLOAD to an Amazon S3 bucket that is not in the same AWS Region as the Amazon Redshift
Expand Down Expand Up @@ -796,6 +799,8 @@ def unload(
statement += "ESCAPE \n"
if allow_overwrite:
statement += "ALLOWOVERWRITE \n"
if extension:
statement += f"EXTENSION '{extension}' \n"
if aws_region:
statement += f"REGION {aws_region} \n"

Expand Down

0 comments on commit b6f9dd8

Please sign in to comment.