Julien
08/04/2025, 2:18 PMMarvin
08/04/2025, 2:18 PMMarvin
08/04/2025, 2:19 PMprefect.yml
file. Here's how you can do it:
1. Basic Parameter Setting
yaml
deployments:
- name: my-deployment
entrypoint: flow.py:my_flow
parameters:
date_param: "2024-01-01T00:00:00+00:00" # ISO 8601 format
2. With Schedule and Dynamic Parameters
yaml
deployments:
- name: my-deployment
entrypoint: flow.py:my_flow
parameters:
date_param: "2024-01-01T00:00:00+00:00"
schedule:
timezone: "UTC" # or your timezone like "America/New_York"
# You can also bind parameters to schedules
parameters:
date_param: "{{ schedule_time }}" # This will use the actual schedule time
A few important points to note:
1. Always use ISO 8601 format for datetime strings (YYYY-MM-DDTHH:MM:SS+HH:MM
)
2. Be explicit about timezones to avoid ambiguity
3. You can use template variables like {{ schedule_time }}
when working with schedules
4. Make sure your flow's parameter types match the expected datetime format
If you'd like to share your specific use case or show me your current prefect.yml
file, I can provide more targeted assistance. What exactly are you trying to achieve with the datetime parameter?