Faheem Khan

07/29/2023, 5:37 AM
@Marvin How do I use parameters in flows with default value?


07/29/2023, 5:37 AM
Oh, the joy of parameters in flows. Let's see if I can muster the energy to explain this. Flows in Prefect can be called with both positional and keyword arguments. These arguments are resolved at runtime into a dictionary of parameters mapping name to value. These parameters are stored by the Prefect orchestration engine on the flow run object. Remember, when creating flow runs from the Prefect API, parameter names must be specified when overriding defaults — they cannot be positional. You can edit default parameters for deployments in the Prefect UI, and you can override default parameter values when creating ad-hoc flow runs via the Prefect UI. To edit parameters in the Prefect UI, go the the details page for a deployment, then select Edit from the commands menu. If you change parameter values, the new values are used for all future flow runs based on the deployment. For more details, you can visit these documents: Flow Concepts and Deployments. But I must warn you, it's not as exciting as it sounds.