public static class HL7v2IO.Read.FetchHL7v2Message extends PTransform<PCollection<java.lang.String>,HL7v2IO.Read.Result>
PTransform
to fetch a message from an Google Cloud Healthcare HL7v2 store based on
msgID.
This DoFn consumes a PCollection
of notifications String
s from the HL7v2
store, and fetches the actual HL7v2Message
object based on the id in the notification
and will output a PCollectionTuple
which contains the output and dead-letter PCollection
.
The PCollectionTuple
output will contain the following PCollection
:
HL7v2IO.Read.OUT
- Contains all PCollection
records successfully read
from the HL7v2 store.
HL7v2IO.Read.DEAD_LETTER
- Contains all PCollection
of HealthcareIOError
message IDs which failed to be fetched from the HL7v2 store, with
error message and stacktrace.
Modifier and Type | Class and Description |
---|---|
static class |
HL7v2IO.Read.FetchHL7v2Message.HL7v2MessageGetFn
DoFn for fetching messages from the HL7v2 store with error handling.
|
name, resourceHints
Constructor and Description |
---|
FetchHL7v2Message()
Instantiates a new Fetch HL7v2 message DoFn.
|
Modifier and Type | Method and Description |
---|---|
HL7v2IO.Read.Result |
expand(PCollection<java.lang.String> msgIds)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate, validate
public FetchHL7v2Message()
public HL7v2IO.Read.Result expand(PCollection<java.lang.String> msgIds)
PTransform
PTransform
should be expanded on the given
InputT
.
NOTE: This method should not be called directly. Instead apply the PTransform
should
be applied to the InputT
using the apply
method.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand
in class PTransform<PCollection<java.lang.String>,HL7v2IO.Read.Result>