Hi all, I got a question regarding the `apply_map...
# prefect-community
f
Hi all, I got a question regarding the `apply_map`function of Prefect. Is it possible to run this from within a task as well, as I am getting the following error:
Copy code
ValueError("Couldn't infer a flow in the current context")
k
Basically
apply_map
unpacks all of the tasks inside and adds them to the Flow, so I don’t think it can be used inside a task because that would imply a task inside a task
f
Is there a way to apply_map to an apply_map?
k
I am not 100% sure, but I think so. Think of
apply_map
as a native Python function that outputs tasks, but you can’t have non-task stuff like
if-else
inside. So it’s hard for me to visualize how this would work.