Is it possible to set a Flow parameter’s type in code? When I go into one of our parametrized flows in Prefect Cloud, each parameter has a Type dropdown. I’d like to explicitly set each of our Parameters to one one the types from the dropdown.
k
Kevin Kho
05/04/2022, 11:28 PM
You can’t in Prefect 1 because they come in JSON. The dropdown is just inferring. This is available in 2.0 as a feature though. For 1.0, I would just check them inside a task for now
s
Sean Leakehe
05/04/2022, 11:29 PM
Roger that, thank you!
k
Kevin Kho
05/04/2022, 11:31 PM
2.0 allows for custom classes also because it is based on pydantic.