kaxil commented on a change in pull request #14177:
URL: https://github.com/apache/airflow/pull/14177#discussion_r574072119



##########
File path: airflow/providers/amazon/aws/transfers/redshift_to_s3.py
##########
@@ -124,10 +138,8 @@ def execute(self, context) -> None:
         credentials = s3_hook.get_credentials()
         credentials_block = build_credentials_block(credentials)
         unload_options = '\n\t\t\t'.join(self.unload_options)
-        s3_key = f"{self.s3_key}/{self.table}_" if self.table_as_file_name 
else self.s3_key
-        select_query = f"SELECT * FROM {self.schema}.{self.table}"
 
-        unload_query = self._build_unload_query(credentials_block, 
select_query, s3_key, unload_options)
+        unload_query = self._build_unload_query(credentials_block, 
self._select_query, self.s3_key, unload_options)

Review comment:
       This should fix the failing static check - 
https://github.com/apache/airflow/pull/14177/checks?check_run_id=1873280398#step:7:213
   
   ```suggestion
           unload_query = self._build_unload_query(
               credentials_block, self._select_query, self.s3_key, 
unload_options
           )
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to