potiuk commented on code in PR #32328:
URL: https://github.com/apache/airflow/pull/32328#discussion_r1259476594


##########
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:
   Will that work when regiom is None? I srsly doubt



##########
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:
   Will that work when region is None? I srsly doubt



-- 
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]

Reply via email to