zhongjiajie commented on a change in pull request #7688: [AIRFLOW-6794] Allow 
AWS Operator RedshiftToS3Transfer To Run a Custom Query
URL: https://github.com/apache/airflow/pull/7688#discussion_r390752987
 
 

 ##########
 File path: airflow/providers/amazon/aws/operators/redshift_to_s3.py
 ##########
 @@ -107,7 +112,12 @@ def execute(self, context):
         credentials = s3_hook.get_credentials()
         unload_options = '\n\t\t\t'.join(self.unload_options)
         s3_key = '{}/{}_'.format(self.s3_key, self.table) if 
self.table_as_file_name else self.s3_key
-        select_query = "SELECT * FROM 
{schema}.{table}".format(schema=self.schema, table=self.table)
+        if self.custom_select_query is None:
+            if self.schema is None or self.table is None:
+                raise AirflowBadRequest("schema, table set to None")
 
 Review comment:
   @swiftomkar WDYT, about this one?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to