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

public class DataframeTransform extends PTransform<PCollection<Row>,PCollection<Row>>
Wrapper for invoking external Python DataframeTransform.
See Also:
  • Method Details

    • of

      public static DataframeTransform of(String func)
      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

      public DataframeTransform withIndexes()
      Sets include_indexes option for DataframeTransform.
      Returns:
      A DataframeTransform with include_indexes option enabled.
    • withExpansionService

      public DataframeTransform withExpansionService(String expansionService)
      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

      public PCollection<Row> expand(PCollection<Row> input)
      Description copied from class: PTransform
      Override this method to specify how this 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).

      Specified by:
      expand in class PTransform<PCollection<Row>,PCollection<Row>>