Hello. Is it possible to run an `op` many times, b...
# ask-community
p
Hello. Is it possible to run an
op
many times, based on output of another
op
?
Copy code
@op(
    out={"result": Out()}
)
def yield_result_for_each_value_in_list():
    for value in ['first', 'second', 'third']:
        yield Output(value, "result")


@graph()
def my_graph():
    result = yield_result_for_each_value_in_list()
    another_op(result)
    # in this graph, I expect that another_op() would be called 3 times
In the above code, I would expect
another_op()
to be called 3 times: first time with
first
as an argument, second time with
second
, third time with
third
. Is it possible to achieve it with Dagster?
dagster bot responded by community 1
m
p
I was able to do what I needed using DynamicOut indeed. Thank you @martin o leary! 🙂
🙌 1