@Internal @Experimental public abstract class PubsubMessageToRow extends PTransform<PCollection<PubsubMessage>,PCollectionTuple> implements java.io.Serializable
PubsubMessage with JSON payload.name| Constructor and Description |
|---|
PubsubMessageToRow() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.beam.sdk.extensions.sql.meta.provider.pubsub.PubsubMessageToRow.Builder |
builder() |
PCollectionTuple |
expand(PCollection<PubsubMessage> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT. |
abstract Schema |
messageSchema()
Schema of the Pubsub message.
|
abstract boolean |
useDlq() |
abstract boolean |
useFlatSchema() |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validatepublic abstract Schema messageSchema()
Required to have at least 'event_timestamp' field of type Schema.FieldType#DATETIME.
If useFlatSchema() is set every other field is assumed to be part of the payload.
Otherwise, the schema must contain exactly:
MAP<VARCHAR,VARCHAR>
ROW<...>
Only UTF-8 JSON objects are supported.
public abstract boolean useDlq()
public abstract boolean useFlatSchema()
public static org.apache.beam.sdk.extensions.sql.meta.provider.pubsub.PubsubMessageToRow.Builder builder()
public PCollectionTuple expand(PCollection<PubsubMessage> 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<PubsubMessage>,PCollectionTuple>