How do you set up a parameter in a parent flow to ...
# prefect-community
r
How do you set up a parameter in a parent flow to be passed after modification into a child flow? I have problems in the using of the parameter. Ive tried...
DOW = Parameter("DOW", default="Monday")
FlowExecution = create_flow_run(
flow_name=FlowName,
project_name=ProjectName,
task_args=dict(name="Flow Execution",trigger=all_successful),
parameters={"StringA":"The Day of the week is "+DOW+"."}
)
AND
DOW = Parameter("DOW", default="Monday")
StringAField = "The Day of the week is "+DOW+"."
FlowExecution = create_flow_run(
flow_name=FlowName,
project_name=ProjectName,
task_args=dict(name="Flow Execution",trigger=all_successful),
parameters={"StringA":StringAField}
)
1
a
have you seen this blog post? it helps to understand how parametrization in 1.0 works https://www.prefect.io/guide/blog/how-to-make-your-data-pipelines-more-dynamic-using-parameters-in-prefect/
r
I did that... just having trouble in the processing of the parameters variable in the Create_Flow_Run. Did I miss something in the passing and concatenation of the Parameter Type?
a
you can pass the object DOW downstream to other tasks - the same way as any data deoendencies
btw did you consider upgrading to 2.0? it's easier to do in 2.0 which is the default version now