Another question (I think combining other features with persistent results is breaking some things today): Any idea why I would be getting 'Object of type Parameter is not JSON serializable'?
k
Kevin Kho
11/15/2021, 5:54 PM
Hey @John Jacoby, I can look into it. Can you give me some example code?
j
John Jacoby
11/15/2021, 6:43 PM
Sure thing I'm AFK right now but I appreciate the support. I'll copy you a snippet when I get back.
k
Kevin Kho
11/15/2021, 6:47 PM
This works for me
Copy code
import prefect
from prefect import Flow, task, Parameter
@task
def add_one(x):
x = int(x)
return x + 1
with Flow("param_Test") as flow:
x = Parameter("x", default=["1", "2", "3"])
test = add_one.map(x)
flow.register("bristech")
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.