@Experimental public class RowToPubsubMessage extends PTransform<PCollection<Row>,PCollection<PubsubMessage>>
PTransform to convert Row to PubsubMessage with JSON payload.
Currently only supports writing a flat schema into a JSON payload. This means that all Row
field values are written to the PubsubMessage JSON payload, except for event_timestamp, which is either ignored or written to the message attributes, depending on
whether PubsubJsonTableProvider.PubsubIOTableConfiguration.getTimestampAttribute() is
set.
name| Modifier and Type | Method and Description |
|---|---|
PCollection<PubsubMessage> |
expand(PCollection<Row> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT. |
static RowToPubsubMessage |
fromTableConfig(PubsubJsonTableProvider.PubsubIOTableConfiguration config) |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validatepublic static RowToPubsubMessage fromTableConfig(PubsubJsonTableProvider.PubsubIOTableConfiguration config)
public PCollection<PubsubMessage> expand(PCollection<Row> input)
PTransformPTransform 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<Row>,PCollection<PubsubMessage>>