[ 
https://issues.apache.org/jira/browse/BEAM-13689?focusedWorklogId=711560&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-711560
 ]

ASF GitHub Bot logged work on BEAM-13689:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Jan/22 18:51
            Start Date: 19/Jan/22 18:51
    Worklog Time Spent: 10m 
      Work Description: steveniemitz commented on a change in pull request 
#16561:
URL: https://github.com/apache/beam/pull/16561#discussion_r788045904



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WriteResult.java
##########
@@ -77,13 +96,41 @@ private WriteResult(
       PCollection<TableRow> failedInserts,
       TupleTag<BigQueryInsertError> failedInsertsWithErrTag,
       PCollection<BigQueryInsertError> failedInsertsWithErr,
-      PCollection<TableRow> successfulInserts) {
+      PCollection<TableRow> successfulInserts,
+      TupleTag<TableDestination> successfulInsertsTag,
+      PCollection<TableDestination> successfulBatchInserts) {
     this.pipeline = pipeline;
     this.failedInsertsTag = failedInsertsTag;
     this.failedInserts = failedInserts;
     this.failedInsertsWithErrTag = failedInsertsWithErrTag;
     this.failedInsertsWithErr = failedInsertsWithErr;
     this.successfulInserts = successfulInserts;
+    this.successfulBatchInsertsTag = successfulInsertsTag;
+    this.successfulBatchInserts = successfulBatchInserts;
+  }
+
+  /**
+   * Returns a {@link PCollection} containing the {@link TableDestinations}s 
that were successfully
+   * inserted.
+   *
+   * <p>Successful Inserts are only produced when using batch inserts.
+   */
+  public PCollection<TableDestination> getSuccessfulBatchInserts() {
+    checkArgument(
+        successfulBatchInsertsTag != null,
+        "Cannot use getSuccessfulInserts because this WriteResult was not 
configured "
+            + "to produce them.  Note: streaming inserts do not produce 
successful "
+            + "insert results.");
+
+    return successfulBatchInserts;

Review comment:
       `getSuccessfulFileLoads` maybe to be consistent with the enum name?




-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 711560)
    Time Spent: 1.5h  (was: 1h 20m)

> BigQueryIO batch writes should output "void" elements when successful
> ---------------------------------------------------------------------
>
>                 Key: BEAM-13689
>                 URL: https://issues.apache.org/jira/browse/BEAM-13689
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-java-gcp
>            Reporter: Steve Niemitz
>            Assignee: Steve Niemitz
>            Priority: P2
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Similar to how other IOs (Bigtable, FileIO, etc) output token elements when 
> their writes complete, BigQueryIO should do the same.  It already does for 
> streaming writes, we should do something similar for batch ones as well.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to