Hi! I need little advice: how to update parameters using view. My default param is [{"1":"a"}, {}]. I want to add value [{"1":"a"}, {"2":"b"}] using view. I choose List in parameter type and put in my json. But prefect show me next value ["{\"1\":\"a\"}, {\"2\":\"b\"}"]. How to create list with objs using view?
k
Kevin Kho
10/25/2021, 5:28 PM
Hey @Ihor Bondartcov, I’ll give this a try
Kevin Kho
10/25/2021, 5:37 PM
When you say view, do you mean the UI?
Kevin Kho
10/25/2021, 5:37 PM
It’s rendering right for me. Are you on Cloud?
i
Ihor Bondartcov
10/25/2021, 5:39 PM
Yes, I mean UI. Yes in cloud.
k
Kevin Kho
10/25/2021, 5:40 PM
Yeah both JSON and non-JSON render correctly for me. How are you registering this Parameter? This is my flow for reference:
Copy code
from prefect import task, Flow, Parameter
import prefect
@task
def abc(x):
logger = prefect.context.get("logger")
<http://logger.info|logger.info>(x)
<http://logger.info|logger.info>(type(x))
return x
with Flow("param_test") as flow:
test = Parameter("test", [{"1":"a"}, {}])
abc(test)
flow.register("bristech")
i
Ihor Bondartcov
10/25/2021, 5:42 PM
Did you change this param using UI?
Ihor Bondartcov
10/25/2021, 5:43 PM
I am registering it in the same way.
k
Kevin Kho
10/25/2021, 5:46 PM
Yes I changed with the UI, so you can see the new value in the logs in the screenshot
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.