2.2 Reduce Operator
The ReduceStreamOperator
is used to reduce the streaming data to non-streaming data.
There are two ways to use the ReduceStreamOperator
:
Build a ReduceStreamOperator
with a reduce function
from dbgpt.core.awel import DAG, ReduceStreamOperator
with DAG("awel_reduce_operator") as dag:
task = ReduceStreamOperator(reduce_function=lambda x, y: x + y)