Hi there prefect people! Here is a really weird is...
# ask-community
m
Hi there prefect people! Here is a really weird issue which didn't seem to happen in the past, but now we've noticed it and we're not sure what to think of it. Here is a simple flow with simple tasks and mapping, but somehow the mapped output in the last task has a different length than the input, but everything is successful in the flow. For example, if you check the image below, you can see the difference in number of outputs, but this is unexpected... Here is the MWE for the simple flow: https://pastebin.com/1hGeYHjV
j
All tasks passed to map (including
upstream_tasks
) are assumed to be iterables that are mapped over. Since strings are iterables, you're accidentally mapping over the output of
task_3
. You probably want to do
Copy code
task_4.map(list_of_ints_2, upstream_tasks=[unmapped(str_output)])
instead, where
unmapped
is
prefect.unmapped
.
🙌 1
m
I was aware of the existence of unmapped, but this one eluded me... I should've posted here hours ago.. Thanks a lot!! Can't believe I was iterating over the string..