Tom Matthews
09/20/2024, 11:13 AMMarvin
09/20/2024, 11:13 AMdeployment.yaml
) or update the deployment via the Prefect UI.
For Prefect 2.x, you can set default parameters directly in your deployment configuration:
yaml
parameters:
name: "Default Name"
num: 42
For Prefect 3.x, ensure you set the default values in your deployment file, so all future runs will inherit these defaults unless overridden:
yaml
deployments:
- name: my_flow_deployment
parameters:
param1: "default_value1"
param2: "default_value2"
schedules:
- cron: "0 0 * * *"
### Key Points to Note
- Edit via Prefect UI: You can also modify default parameters via the Prefect UI. Go to the deployment details page, select "Edit," and alter the parameters accordingly.
- *Pass kwargs*: If you want to pass keyword arguments dynamically, structure them as JSON key-value pairs in the deployment configuration.
For further details on scheduling and deployment parameters, you can refer to the documentation:
- Prefect 2.x Schedules: Prefect 2.x Scheduling
- Prefect 3.x Schedules: Prefect 3.x Scheduling
- Prefect 3.x Deployment: Prefect 3.x Deployment
Using these steps will ensure that your flow uses the default values defined in your Pydantic model, making the deployment reliable and consistent.Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by