Martin Laurent
02/22/2024, 2:24 PMScout
02/22/2024, 2:24 PMpython from dagster import op, Out from typing import Tuple @op(out={"int_output": Out(), "str_output": Out()}) def my_multiple_output_op() -> Tuple[int, str]: return (5, "foo")
In this example, the my_multiple_output_op
op is defined with two outputs: int_output
and str_output
. The op returns a tuple with two elements, where the first element is an integer and the second is a string. The outputs are expected to follow the order they are specified in the op's out
dictionary, so the int
output corresponds to int_output
, and the str
output corresponds to str_output
.