msbukal commented on a change in pull request #13786:
URL: https://github.com/apache/beam/pull/13786#discussion_r562943059
##########
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:
I agree, adding both to the object is the best option & definitely makes
it the easiest to read.
----------------------------------------------------------------
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]