Class DataframeTransform
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<Row>,PCollection<Row>>
org.apache.beam.sdk.extensions.python.transforms.DataframeTransform
- All Implemented Interfaces:
Serializable
,HasDisplayData
Wrapper for invoking external Python
DataframeTransform
.- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Method Summary
Modifier and TypeMethodDescriptionexpand
(PCollection<Row> input) Override this method to specify how thisPTransform
should be expanded on the givenInputT
.static DataframeTransform
Instantiates a multi-language wrapper for a Python DataframeTransform with a given lambda function.withExpansionService
(String expansionService) Sets an expansion service endpoint for DataframeTransform.Sets include_indexes option for DataframeTransform.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
Instantiates a multi-language wrapper for a Python DataframeTransform with a given lambda function.- Parameters:
func
- A Python lambda function that accepts Pandas dataframe object.- Returns:
- A
DataframeTransform
for the given lambda function.
-
withIndexes
Sets include_indexes option for DataframeTransform.- Returns:
- A
DataframeTransform
with include_indexes option enabled.
-
withExpansionService
Sets an expansion service endpoint for DataframeTransform.- Parameters:
expansionService
- A URL for a Python expansion service.- Returns:
- A
DataframeTransform
for the given expansion service endpoint.
-
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).
- Specified by:
expand
in classPTransform<PCollection<Row>,
PCollection<Row>>
-