Harry Baker
08/04/2021, 4:00 PM@task(task_run_name="{name_val}")
and then passing in a name_val variable would do it, but in the dashboard everything is still showing up as the name of the function definitionKevin Kho
Kevin Kho
Flow Schematic
and the Flow Run Schematic
. The Flow Schematic is created during build time when the template values are not there yet, so of course it can’t reflect the templated name. But the Flow Run Schematic
will. Here is a sample flow:
from prefect import task, Flow
@task(task_run_name="{name_val}")
def test(x, name_val):
return x + 1
with Flow("task_name") as flow:
test(1, name_val="test1")
test(2, name_val="test2")
test(3, name_val="test3")
test(4, name_val="test4")
flow.register("dremio")
Kevin Kho
Harry Baker
08/04/2021, 4:32 PMKevin Kho
Harry Baker
08/04/2021, 4:34 PM