Is there an easy way to set/change the Name/Slug o...
# prefect-community
m
Is there an easy way to set/change the Name/Slug of a Task based on the arguments? (ie, a task for running Jupyter notebooks that names the task after the filename of the notebook)
k
I think you want this
m
sweet, thanks!
@Kevin Kho Does that work if you need to transform the argument in some way? Like let's say it gets passed a dictionary and I wanna access one particular element of the dictionary for the Task's name?
k
You can use a function also, I think it’s in this doc
m
Aha! Thanks
Is there a way to do that with the Slug? (that's the thing that determines what shows up in the GUI, right?)
k
I don’t think there is a way for the slug
j
Somewhat related to this question, is there a way to query the flow run using task_run_name?
k
More like query for task_run_name and then return the flow_run accompanying it