turbaszek commented on a change in pull request #14276:
URL: https://github.com/apache/airflow/pull/14276#discussion_r577733707
##########
File path: airflow/providers/google/cloud/transfers/gdrive_to_gcs.py
##########
@@ -129,4 +104,10 @@ def execute(self, context):
delegate_to=self.delegate_to,
impersonation_chain=self.impersonation_chain,
)
- self._upload_data(gdrive_hook=gdrive_hook, gcs_hook=gcs_hook)
+ file_metadata = gdrive_hook.get_file_id(
+ folder_id=self.folder_id, file_name=self.file_name,
drive_id=self.drive_id
+ )
+ with gcs_hook.provide_file_and_upload(
+ bucket_name=self.bucket_name, object_name=self.object_name
+ ) as file:
+ gdrive_hook.download_file(file_id=file_metadata["id"],
file_handle=file)
Review comment:
Should we also adjust tests?
----------------------------------------------------------------
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]