File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
pipelines/batch/src/main/java/com/google/fhir/analytics Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2020-2024 Google LLC
2+ * Copyright 2020-2025 Google LLC
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -342,7 +342,11 @@ public static Pipeline writeMergedViewsPipeline(
342342 public void processElement (ProcessContext c ) {
343343 KV <String , CoGbkResult > e = c .element ();
344344 List <GenericRecord > lastRecords = new ArrayList <>();
345- e .getValue ().getAll (newDwh ).forEach (lastRecords ::add );
345+ Iterable <GenericRecord > iter = e .getValue ().getAll (newDwh );
346+ if (!iter .iterator ().hasNext ()) {
347+ iter = e .getValue ().getAll (oldDwh );
348+ }
349+ iter .forEach (lastRecords ::add );
346350 for (GenericRecord r : lastRecords ) {
347351 c .output (r );
348352 }
You can’t perform that action at this time.
0 commit comments