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



##########
File path: airflow/providers/amazon/aws/transfers/redshift_to_s3.py
##########
@@ -101,6 +107,14 @@ def __init__(  # pylint: disable=too-many-arguments
         self.include_header = include_header
         self.table_as_file_name = table_as_file_name
 
+        self._select_query = None
+        if select_query:
+            self._select_query = select_query
+        elif self.schema and self.table:
+            self._select_query = f"SELECT * FROM {self.schema}.{self.table}"
+        else:
+            raise ValueError('Please provide both `schema` and `table` params 
or `select_query` to fetch the data.')

Review comment:
       Would recommend installing pre-commit to identify this before running 
`git commit`:
   
   More details: 
https://github.com/apache/airflow/blob/master/STATIC_CODE_CHECKS.rst




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