Hi folks, is it possible to call a task inside ano...
# ask-community
r
Hi folks, is it possible to call a task inside another task? Something like this: def function_a(): c = a + b return c task def do_something(): y = function(a) return y
k
You can use the Python under the hood by doing
task.run()
but it’s not a task anymore with observability. It is just a Python function
r
so i cloud call function_a.run()..?
k
Is function_a a task or function?
r
a task
k
Then yes
function_a.run()
But in the code above, you may as well just keep function_a as a function and just call the function inside the task
r
Hi Kevin, as a feedback to all your help yesterday, I was trying to running a for looping inside the With flow block, but I did'nt realize I could use just the map function and prefect do all the heavy lift for me... Thanks for directing my attention.
👍 1