https://prefect.io logo
Title
d

Diego Oliveira

03/24/2022, 6:32 PM
Hello everyone. I would like to know if is possible to dynamically change run name based on schedule parameter?
k

Kevin Kho

03/24/2022, 6:32 PM
Yeah, you can use the RenameFlowRun task and just use the Parameter value in it
:upvote: 1
a

Anna Geller

03/24/2022, 6:40 PM
This ☝️ is if you want to rename a flow run name. If you are more interested in changing a task or task run name, please clarify
d

Diego Oliveira

03/24/2022, 7:09 PM
The scheduled runs uses the random name combinations to generate run names. I would like to use one of the run parameters to name the run
k

Kevin Kho

03/24/2022, 7:10 PM
Yeah using the RenameFlowRun task will help you
a

Anna Geller

03/24/2022, 7:12 PM
Yup. Hereis an example: https://discourse.prefect.io/t/how-can-i-set-a-custom-flow-run-name-instead-of-using-the-randomly-generated-adjective-noun-combination/131 and if you want to use parameter values in the name, you can grab those from the context:
prefect.context["parameters"].get("parameter_name")
🙏 1
:upvote: 1
d

Diego Oliveira

03/24/2022, 8:45 PM
Thanks