krishna Yerramsetty
07/05/2022, 5:40 PM@dynamic
def wrapper_task(a: typing.List[int]) -> str:
mapped_out = map_task(a_mappable_task)(a=a).with_overrides(
retries=4,
)
coalesced = coalesce(b=mapped_out)
return coalesced
@task
def a_mappable_task(a: int) -> str:
inc = a + 2
stringified = str(inc)
return stringified
@task
def coalesce(b: typing.List[str]) -> str:
coalesced = "".join(b)
return coalesced
@workflow
def my_map_workflow(a: typing.List[int]) -> str:
return wrapper_task(a=a)
if __name__ == "__main__":
result = my_map_workflow(a=[1, 2, 3, 4, 5])
print(f"{result}")
I am seeing a type mismatch compilation error however at run-time:
User] malformed dynamic workflow, caused by: Collected Errors: 2
Error 0: Code: MismatchingTypes, Node Id: dn1, Description: Variable [o0] (type [collection_type:<collection_type:<simple:STRING > > ]) doesn't match expected type [collection_type:<simple:STRING > ].
Any ideas on why the return is a list of lists from the mapped task? And how do I correctly pass these outputs onto other tasks?Yee
krishna Yerramsetty
07/05/2022, 11:12 PMYee
krishna Yerramsetty
07/07/2022, 4:07 PMYee
krishna Yerramsetty
07/12/2022, 3:28 AM