ahmedabu98 commented on code in PR #34324:
URL: https://github.com/apache/beam/pull/34324#discussion_r2001735397


##########
sdks/python/apache_beam/io/gcp/bigquery_file_loads.py:
##########
@@ -1313,3 +1312,9 @@ def expand(self, pcoll):
         self.DESTINATION_FILE_PAIRS: all_destination_file_pairs_pc,
         self.DESTINATION_COPY_JOBID_PAIRS: destination_copy_job_ids_pc,
     }
+
+
+class KeyByPaneIndex(beam.DoFn):
+  def process(self, element, pane_info=beam.DoFn.PaneInfoParam):
+    destination, (partition_key, files) = element
+    return [(destination, (partition_key, files, pane_info.index))]

Review Comment:
   Does it make sense to do this keying by pane in the upstream 
`PartitionFiles` DoFn? i.e. instead of creating a new dedicated step.
   
   I think that'll make it easier to revert this quick fix when Reshuffle gets 
fixed (which should be the longterm solution)



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