Closed markheger closed 4 years ago
merged to IBMStreams:feature/punct
Add an option that Punctor replaces a tuple by a window punctuation.
topo = Topology()
s = topo.source(generate_numbers_for_named_tuple_schema)
s = s.punctor(func=(lambda t : True == t.punct_flag), replace=True)
s = s.map(lambda x : (x.value,), schema='tuple<int32 z>')
s.print(write_punctuations=True)
merged to develop branch for 1.16.0a
Support to emit Window punctuation like the SPL Punctor, but Python func is called to determine the condition when punct needs to be sent.
Stream.print() has a new parameter to print the punctuations to stdout.