Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12984

InteractiveRunner cannot collect PCollections from composites

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.34.0
    • runner-py-interactive
    • None

    Description

      The following code will complain and throw an exception that there is no producer for some PCollection.

      ```
      import apache_beam as beam
      import apache_beam.runners.interactive.interactive_beam as ib
      import apache_beam.runners.interactive.interactive_runner as ir

      @beam.ptransform_fn
      def Foo(pcoll):
      p1 = pcoll | 'ident' >> beam.Map(lambda n: n)
      p2 = pcoll | 'to str' >> beam.Map(str)
      return

      {'pc1': p1, 'pc2': p2}

      p = beam.Pipeline(ir.InteractiveRunner())
      res = p | 'my create' >> beam.Create([1]) | 'my foo' >> Foo()

      ib.collect(res['pc1'])
      ```

      Attachments

        Issue Links

          Activity

            People

              rohdesam Sam Rohde
              rohdesam Sam Rohde
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 40m
                  2h 40m