You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Sam Rohde (Jira)" <ji...@apache.org> on 2021/09/29 20:00:00 UTC

[jira] [Created] (BEAM-12984) InteractiveRunner cannot collect PCollections from composites

Sam Rohde created BEAM-12984:
--------------------------------

             Summary: InteractiveRunner cannot collect PCollections from composites 
                 Key: BEAM-12984
                 URL: https://issues.apache.org/jira/browse/BEAM-12984
             Project: Beam
          Issue Type: Bug
          Components: runner-py-interactive
            Reporter: Sam Rohde
            Assignee: Sam Rohde
             Fix For: 2.34.0


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'])
```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)