beam icon indicating copy to clipboard operation
beam copied to clipboard

[Bug]: Yaml Dataflow - yaml provider - composite transform cant as middle transform

Open ZwxwZ opened this issue 9 months ago • 1 comments

What happened?

In yaml provider, this yaml working fine with "type: chain"

- type: yaml
  transforms:
    # Define the first transform of type "RaiseElementToPower"
    RaiseElementToPower:
      config_schema:
        properties:
          n: {type: integer}
      body:
        type: chain
        transforms:
          - type: MapToFields
            config:
              language: python
              append: true
              fields:
                power: "element ** {{n}}"

If i change the type to "type: composite",

- type: yaml
  transforms:
    # Define the first transform of type "RaiseElementToPower"
    RaiseElementToPower:
      config_schema:
        properties:
          n: {type: integer}
      body:
        type: composite
        transforms:
          - type: MapToFields
            input: xxxx
            config:
              language: python
              append: true
              fields:
                power: "element ** {{n}}"

there will have error, beacause it's required an input for the transform, "type: composite" require include the input into the sub-yaml,

success example for "composite": https://github.com/apache/beam-starter-python-provider/blob/main/examples/multi_input_output.yaml

do composite transform must including the input into one page?

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • [ ] Component: Python SDK
  • [ ] Component: Java SDK
  • [ ] Component: Go SDK
  • [ ] Component: Typescript SDK
  • [ ] Component: IO connector
  • [ ] Component: Beam YAML
  • [ ] Component: Beam examples
  • [ ] Component: Beam playground
  • [ ] Component: Beam katas
  • [ ] Component: Website
  • [ ] Component: Infrastructure
  • [ ] Component: Spark Runner
  • [ ] Component: Flink Runner
  • [ ] Component: Samza Runner
  • [ ] Component: Twister2 Runner
  • [ ] Component: Hazelcast Jet Runner
  • [ ] Component: Google Cloud Dataflow Runner

ZwxwZ avatar Mar 02 '26 08:03 ZwxwZ

HI @ZwxwZ I would like to contribute to this issue if it is not assigned to anyone...

boy397 avatar Mar 03 '26 19:03 boy397