yuseok89 commented on code in PR #61347:
URL: https://github.com/apache/airflow/pull/61347#discussion_r2854330437


##########
providers/google/src/airflow/providers/google/cloud/transfers/sheets_to_gcs.py:
##########
@@ -128,7 +142,11 @@ def execute(self, context: Context):
         for sheet_range in sheet_titles:
             data = sheet_hook.get_values(spreadsheet_id=self.spreadsheet_id, 
range_=sheet_range)
             gcs_path_to_file = self._upload_data(gcs_hook, sheet_hook, 
sheet_range, data)
-            destination_array.append(gcs_path_to_file)
+            if self.return_gcs_uris:
+                gcs_uri = f"gs://{self.destination_bucket}/{gcs_path_to_file}"
+                destination_array.append(gcs_uri)
+            else:
+                destination_array.append(gcs_path_to_file)

Review Comment:
   For this operator, existing users get object paths from the 
`destination_objects` XCom key, while the new behavior is exposed via the 
return value. Since the new feature returns full URIs through the return value, 
it shouldn’t affect existing users who read from XCom. Is the `return_gcs_uris` 
flag really necessary?
   
   cc @shahar1 



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