- Type Parameters:
InputT
- the type of the input to this PTransformOutputT
- the type of the output to this PTransform
- All Implemented Interfaces:
Serializable
,HasDisplayData
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.
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Method Summary
Modifier and TypeMethodDescriptionOverride this method to specify how thisPTransform
should be expanded on the givenInputT
.static YamlTransform
<PCollection<Row>, PCollection<Row>> Creates a new YamlTransform mapping a single input PCollection<Row> to a single PCollection<Row> output.static YamlTransform
<PCollection<Row>, PCollection<Row>> Creates a new YamlTransform mapping a single input PCollection<Row> to a single PCollection<Row> output.static YamlTransform
<PBegin, PCollection<Row>> Creates a new YamlTransform PBegin a single PCollection<Row> output.withMultipleInputs
(String... inputTags) Indicates that this YamlTransform expects multiple, named inputs.withMultipleOutputs
(String... outputTags) Indicates that this YamlTransform expects multiple, named outputs.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Method Details
-
of
Creates a new YamlTransform mapping a single input PCollection<Row> to a single PCollection<Row> output.Use
withMultipleInputs(java.lang.String...)
orwithMultipleOutputs(java.lang.String...)
to indicate that this transform has multiple inputs and/or outputs.- Parameters:
yamlDefinition
- a YAML string defining this transform.- Returns:
- a PTransform that applies this YAML to its inputs.
-
source
Creates a new YamlTransform PBegin a single PCollection<Row> output.- Parameters:
yamlDefinition
- a YAML string defining this source.- Returns:
- a PTransform that applies this YAML as a root transform.
-
sink
Creates a new YamlTransform mapping a single input PCollection<Row> to a single PCollection<Row> output.Use
withMultipleOutputs(java.lang.String...)
to indicate that this sink has multiple (or no) or outputs.- Parameters:
yamlDefinition
- a YAML string defining this sink.- Returns:
- a PTransform that applies this YAML to its inputs.
-
withMultipleInputs
Indicates that this YamlTransform expects multiple, named inputs.- Parameters:
inputTags
- the set of expected input tags to this transform- Returns:
- a PTransform like this but with a
PCollectionRowTuple
input type.
-
withMultipleOutputs
Indicates that this YamlTransform expects multiple, named outputs.- Parameters:
outputTags
- the set of expected output tags to this transform- Returns:
- a PTransform like this but with a
PCollectionRowTuple
output type.
-
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
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).
-