[
https://issues.apache.org/jira/browse/BEAM-9990?focusedWorklogId=443989&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-443989
]
ASF GitHub Bot logged work on BEAM-9990:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Jun/20 20:55
Start Date: 10/Jun/20 20:55
Worklog Time Spent: 10m
Work Description: pabloem commented on a change in pull request #11702:
URL: https://github.com/apache/beam/pull/11702#discussion_r438403098
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java
##########
@@ -155,17 +168,53 @@
* FhirIO.Write.Result writeResult =
* output.apply("Execute FHIR Bundles",
FhirIO.executeBundles(options.getExistingFhirStore()));
*
+ * // Alternatively you could use import for high throughput to a new store.
+ * FhirIO.Write.Result writeResult =
+ * output.apply("Import FHIR Resources",
FhirIO.executeBundles(options.getNewFhirStore()));
+ * // [End Writing ]
+ *
* PCollection<HealthcareIOError<String>> failedBundles =
writeResult.getFailedInsertsWithErr();
*
+ * // [Begin Writing to Dead Letter Queue]
* failedBundles.apply("Write failed bundles to BigQuery",
* BigQueryIO
* .write()
* .to(option.getBQFhirExecuteBundlesDeadLetterTable())
* .withFormatFunction(new HealthcareIOErrorToTableRow()));
+ * // [End Writing to Dead Letter Queue]
+ *
+ * // Alternatively you may want to handle DeadLetter with conditional update
+ * // [Begin Reconciliation with Conditional Update]
+ * failedBundles
+ * .apply("Reconcile with Conditional Update",
+ * FhirIO.ConditionalUpdate(fhirStore)
+ *
.withFormatBodyFunction(HealthcareIOError<String>::getDataResource)
+ * .withTypeFunction((HealthcareIOError<String> err) -> {
+ * String body = err.getDataResource();
+ * // TODO(user) insert logic to exctract type.
+ * return params;
Review comment:
Sounds good. No need to add!
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 443989)
Time Spent: 1h 40m (was: 1.5h)
> FhirIO should support conditional create / update methods
> ---------------------------------------------------------
>
> Key: BEAM-9990
> URL: https://issues.apache.org/jira/browse/BEAM-9990
> Project: Beam
> Issue Type: Improvement
> Components: io-java-gcp
> Reporter: Jacob Ferriero
> Assignee: Jacob Ferriero
> Priority: P2
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> There are many use cases where it is expected that calling executeBundles in
> a distributed environment may fail (e.g. trying to create a resource that
> already exists).
> We should add classes to support the following methods as implementations of
> FhirIO.Write to provide more robust reconciliation strategies for Dead Letter
> Queues involving FhirIO.Write
> https://cloud.google.com/healthcare/docs/reference/rest/v1beta1/projects.locations.datasets.fhirStores.fhir/conditionalUpdate
> https://cloud.google.com/healthcare/docs/reference/rest/v1beta1/projects.locations.datasets.fhirStores.fhir/create
> https://cloud.google.com/healthcare/docs/reference/rest/v1beta1/projects.locations.datasets.fhirStores.fhir/update
--
This message was sent by Atlassian Jira
(v8.3.4#803005)