https://prefect.io logo
#prefect-community
Title
# prefect-community
n

Nakul Goyal

07/17/2020, 1:28 PM
Hey, I have a scenario where I want to execute certain number of functions in a flow, but the flow has to be created dynamically. I am exploring Prefect for the same. Example: def func1(): returns A def func2(A): returns B def func3(B): returns C ------------------------------ Using flow.chain(func1,func2,func3) I can create a dynamic flow (will pick function names from configuration file). This works when these functions are standalone, but I am not sure about how to manage the dependent parameters or external parameters. Can some one guide here if came across such a ?
n

nicholas

07/17/2020, 2:04 PM
Hi @Nakul Goyal- it sounds like you could benefit from the Prefect Control tasks, which give you really granular control over which tasks are called in your pipeline. This gives you a clear way to manage parameters and dependencies of conditional branches, while also giving you an explicit, readable, and maintainable pipeline.
n

Nakul Goyal

07/18/2020, 5:22 AM
@nicholas Thanks
Also, Is there any example which I can refer to?