diff --git a/parsons/databases/redshift/redshift.py b/parsons/databases/redshift/redshift.py index 84bf0fdebf..a870d90a11 100644 --- a/parsons/databases/redshift/redshift.py +++ b/parsons/databases/redshift/redshift.py @@ -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, @@ -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 @@ -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"