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


##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/WriteToDestinations.java:
##########
@@ -108,11 +119,40 @@ public KV<ShardedKey<Row>, Row> apply(Row elem) {
                 "Write remaining rows to files",
                 new WriteGroupedRowsToFiles(catalogConfig, 
dynamicDestinations));
 
+    PCollection<FileWriteResult> writeUngroupedResultPColl = 
writeUngroupedResult.getWrittenFiles();

Review Comment:
   Done



##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/WriteToDestinations.java:
##########
@@ -108,11 +119,40 @@ public KV<ShardedKey<Row>, Row> apply(Row elem) {
                 "Write remaining rows to files",
                 new WriteGroupedRowsToFiles(catalogConfig, 
dynamicDestinations));
 
+    PCollection<FileWriteResult> writeUngroupedResultPColl = 
writeUngroupedResult.getWrittenFiles();
+
+    if (triggeringFrequency != null) {
+      // for streaming pipelines, re-window both outputs to keep Flatten happy
+      writeGroupedResult =
+          writeGroupedResult.apply(
+              "RewindowGroupedRecords",
+              Window.<FileWriteResult>into(new GlobalWindows())

Review Comment:
   Thanks, setting discarding mode



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