pabloem commented on a change in pull request #13786:
URL: https://github.com/apache/beam/pull/13786#discussion_r562925374



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java
##########
@@ -1488,6 +1490,20 @@ private Result(PCollectionTuple pct) {
        * @return the resources
        */
       public PCollection<JsonArray> getResources() {
+        return resources
+            .apply(
+                "Extract Values",
+                MapElements.into(TypeDescriptor.of(JsonArray.class))
+                    .via((KV<String, JsonArray> in) -> in.getValue()))
+            .setCoder(JsonArrayCoder.of());
+      }

Review comment:
       If a user calls this function many times (to use the resources 
collection in multiple places), we would append multiple `MapElements` 
transforms to the pipeline - this may not be the effect they would expect. 
Perhaps checking to only create unkeyed resources once?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to