Hi everyone — I have a tiny flow I’m using to start other flows, and I’m passing a “run_name” argument to the “create_flow_run” method but the “run_name” depends on parameter and it’s not working as I expected. Can anyone help? I feel like I need to “delay” the “resolution of what ‘scope’ is” but not sure
a
Anna Geller
01/28/2022, 2:20 PM
Passing parameter values as run name is currently not supported. I will open an issue for it, thanks for raising this!
Anna Geller
01/28/2022, 2:31 PM
@Bruno Murino Here is an issue - there is a workaround you could use to solve it and I showed it in the issue
Anna Geller
01/28/2022, 2:32 PM
Workaround:
Copy code
from prefect import Flow, Parameter, task
from prefect.tasks.prefect import create_flow_run
@task
def get_curom_run_name(param: str):
return f"API {param}"
with Flow("02_parent_flow") as parent_flow:
param = Parameter("user_name", default="world")
child_flow_run_name = get_curom_run_name(param)
flow_run_id = create_flow_run(
flow_name="01_child_flow",
project_name="xyz",
parameters=dict(user_name=param),
run_name=child_flow_run_name,
)
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.