You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "RobMcKiernan (via GitHub)" <gi...@apache.org> on 2023/04/13 09:46:41 UTC

[GitHub] [beam] RobMcKiernan commented on issue #19070: Composite windowing fail with exception: AttributeError: 'NoneType' object has no attribute 'time'

RobMcKiernan commented on issue #19070:
URL: https://github.com/apache/beam/issues/19070#issuecomment-1506671352

   I'm also experiencing this issue when testing locally. I haven't tried it running with any other runner other than the DirectRunner though.
   ```
   test_stream = TestStream()
   test_stream.add_elements(input_data)
   with TestPipeline() as testpipeline:
       results = (
                   testpipeline
                   | test_stream
                   | "Add info"
                   >> beam.ParDo(MyDoFn()
               )
   
       (
                   results
                   | "Form datapoints" >> beam.ParDo(FormDataPoints())
                   | "Emit datapoints on over x num elems or after y time elapsed"
                   >> beam.WindowInto(
                       window.GlobalWindows(),
                       trigger=trigger.Repeatedly(
                           trigger.AfterAny(trigger.AfterCount(1), trigger.AfterProcessingTime(2))
                       ),
                       accumulation_mode=trigger.AccumulationMode.DISCARDING,
                   )
                   | "Group by table" >> beam.GroupBy(lambda x: x.table)
                   | "print" >> Map(print)
       )
   ```
   
   There's some good clues from the user Subhash in this jira issue: https://issues.apache.org/jira/browse/BEAM-5132 if that helps
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org