pabloem commented on code in PR #21872:
URL: https://github.com/apache/beam/pull/21872#discussion_r907641916


##########
sdks/python/apache_beam/io/gcp/bigquery.py:
##########
@@ -1494,6 +1544,112 @@ def writer(self, test_bigquery_client=None, 
buffer_size=None):
         buffer_size=buffer_size)
 
 
+class WriteResult:
+  """The result of a WriteToBigQuery transform.
+  """
+  def __init__(
+      self,
+      method=None,
+      destination_load_jobid_pairs=None,
+      destination_file_pairs=None,
+      destination_copy_jobid_pairs=None,
+      failed_rows=None,
+      failed_rows_with_errors=None):
+
+    self.method: str = method
+    self._destination_load_jobid_pairs: PCollection = 
destination_load_jobid_pairs
+    self._destination_file_pairs: PCollection = destination_file_pairs
+    self._destination_copy_jobid_pairs: PCollection = 
destination_copy_jobid_pairs
+    self._failed_rows: PCollection = failed_rows
+    self._failed_rows_with_errors: PCollection = failed_rows_with_errors

Review Comment:
   thanks! can you add the subtype for the `PCollection` types? (e.g. 
`PCollection[Tuple[str, str]]` for destination_load_jobid_pairs, etc).



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