Nuno
08/10/2023, 10:23 AM@multi_asset(outs={"b": AssetOut(), "c": AssetOut()})
def example_op(a: pd.DataFrame) -> Output[Tuple[pd.DataFrame, pd.DataFrame]]:
b, c = split_into_two_dfs(a)
return Output(
(b, c),
metadata={
"num_rows_b": b.shape[0],
"num_rows_c": c.shape[0],
},
)
The code above yields the following error:
dagster._core.errors.DagsterInvariantViolationError: Expected Tuple annotation for multiple outputs, but received non-tuple annotation.
Not sure what I am missing and would very much appreciate any feedback. Thanks in advance!Zach
08/10/2023, 3:18 PM@multi_asset(outs={"b": AssetOut(), "c": AssetOut()})
def example_op(a: pd.DataFrame) -> Tuple[Output[pd.DataFrame], Output[pd.DataFrame]]:
b, c = split_into_two_dfs(a)
return Output(b,metadata={"num_rows_b": b.shape[0]}), Output(c, metadata={"num_rows_c": c.shape[0],})
Nuno
08/14/2023, 3:11 PM