https://prefect.io logo
Title
a

Akshay Verma

08/13/2019, 6:14 AM
Is it possible to define Dataclass as parameter for the flow?
c

Chris White

08/13/2019, 3:31 PM
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

Akshay Verma

08/13/2019, 3:50 PM
Ok, I would like to try it. Where can I look to try this?
c

Chris White

08/13/2019, 4:02 PM
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

Akshay Verma

08/16/2019, 2:39 PM
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

Chris White

08/16/2019, 3:08 PM
Yea for sure! Just pass in a dictionary as the parameter value.
👍 1