InputT
- the type of the input to this PTransformOutputT
- the type of the output to this PTransformpublic class YamlTransform<InputT extends PInput,OutputT extends POutput> extends PTransform<InputT,OutputT>
This leverages Beam's cross-langauge transforms. Although python is required to parse and expand the given transforms, the actual implementation may still be in Java.
annotations, displayData, name, resourceHints
Modifier and Type | Method and Description |
---|---|
OutputT |
expand(InputT input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
static YamlTransform<PCollection<Row>,PCollection<Row>> |
of(java.lang.String yamlDefinition)
Creates a new YamlTransform mapping a single input PCollection<Row> to a single
PCollection<Row> output.
|
static YamlTransform<PCollection<Row>,PCollection<Row>> |
sink(java.lang.String yamlDefinition)
Creates a new YamlTransform mapping a single input PCollection<Row> to a single
PCollection<Row> output.
|
static YamlTransform<PBegin,PCollection<Row>> |
source(java.lang.String yamlDefinition)
Creates a new YamlTransform PBegin a single PCollection<Row> output.
|
YamlTransform<PCollectionRowTuple,OutputT> |
withMultipleInputs(java.lang.String... inputTags)
Indicates that this YamlTransform expects multiple, named inputs.
|
YamlTransform<InputT,PCollectionRowTuple> |
withMultipleOutputs(java.lang.String... outputTags)
Indicates that this YamlTransform expects multiple, named outputs.
|
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
public static YamlTransform<PCollection<Row>,PCollection<Row>> of(java.lang.String yamlDefinition)
Use withMultipleInputs(java.lang.String...)
or withMultipleOutputs(java.lang.String...)
to indicate that this
transform has multiple inputs and/or outputs.
yamlDefinition
- a YAML string defining this transform.public static YamlTransform<PBegin,PCollection<Row>> source(java.lang.String yamlDefinition)
yamlDefinition
- a YAML string defining this source.public static YamlTransform<PCollection<Row>,PCollection<Row>> sink(java.lang.String yamlDefinition)
Use withMultipleOutputs(java.lang.String...)
to indicate that this sink has multiple (or no) or outputs.
yamlDefinition
- a YAML string defining this sink.public YamlTransform<PCollectionRowTuple,OutputT> withMultipleInputs(java.lang.String... inputTags)
inputTags
- the set of expected input tags to this transformPCollectionRowTuple
input type.public YamlTransform<InputT,PCollectionRowTuple> withMultipleOutputs(java.lang.String... outputTags)
outputTags
- the set of expected output tags to this transformPCollectionRowTuple
output type.public OutputT expand(InputT input)
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).