Is it possible to define Dataclass as parameter fo...
# show-and-tell
a
Is it possible to define Dataclass as parameter for the flow?
c
Hi @Akshay Verma - technically yes, when you are running Prefect Core locally. However, if you ever want to deploy your flow to Prefect Cloud or if you ever want to turn checkpointing on,
Parameters
will be required to be JSON serializable
a
Ok, I would like to try it. Where can I look to try this?
c
To try what exactly? Here is an example of using a Parameter within a Flow: https://docs.prefect.io/guide/examples/parameterized_flow.html
a
I wanted to pass multiple parameters as a collection, and that is why I thought about DataClass. Is there a way to pass on a collection, in maybe json or something else, to the flow and not do it one by one?
c
Yea for sure! Just pass in a dictionary as the parameter value.
👍 1