Adaverse commented on code in PR #32328:
URL: https://github.com/apache/airflow/pull/32328#discussion_r1259560876
##########
airflow/providers/amazon/aws/transfers/s3_to_redshift.py:
##########
@@ -119,13 +119,16 @@ def __init__(
if arg in self.redshift_data_api_kwargs.keys():
raise AirflowException(f"Cannot include param '{arg}' in
Redshift Data API kwargs")
- def _build_copy_query(self, copy_destination: str, credentials_block: str,
copy_options: str) -> str:
+ def _build_copy_query(
+ self, copy_destination: str, credentials_block: str, region_info: str
| None, copy_options: str
+ ) -> str:
column_names = "(" + ", ".join(self.column_list) + ")" if
self.column_list else ""
return f"""
COPY {copy_destination} {column_names}
FROM 's3://{self.s3_bucket}/{self.s3_key}'
credentials
'{credentials_block}'
+ {region_info}
Review Comment:
Nice catch. It can only be None when user passes null in the extra config.
Should be handled explicitly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]