utkarsharma2 commented on code in PR #30460:
URL: https://github.com/apache/airflow/pull/30460#discussion_r1161411224


##########
airflow/providers/amazon/aws/transfers/sql_to_s3.py:
##########
@@ -170,15 +172,26 @@ def execute(self, context: Context) -> None:
         self._fix_dtypes(data_df, self.file_format)
         file_options = FILE_OPTIONS_MAP[self.file_format]
 
-        with NamedTemporaryFile(mode=file_options.mode, 
suffix=file_options.suffix) as tmp_file:
-
-            self.log.info("Writing data to temp file")
-            getattr(data_df, file_options.function)(tmp_file.name, 
**self.pd_kwargs)
-
-            self.log.info("Uploading data to S3")
-            s3_conn.load_file(
-                filename=tmp_file.name, key=self.s3_key, 
bucket_name=self.s3_bucket, replace=self.replace
-            )
+        for group_name, df in self._partition_dataframe(df=data_df):

Review Comment:
   Thanks for pointing it out, was not intentional :)



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