Hey, I have a scenario where I want to execute cer...
# prefect-community
n
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
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
@nicholas Thanks
Also, Is there any example which I can refer to?