Martim Lobao
01/13/2022, 11:49 AMtask_run_name
and name
args in the task
decorator to provide more context, but neither works the way I’d like it to.
as a MWE, here’s a sketch of what I’d like to happen:
with Flow() as flow:
task_a(entity="foo") # shows up as "foo_task" in the DAG
task_a(entity="bar") # shows up as "bar_task" in the DAG
the issue is that name
only takes in static strings (so name="{entity}"
doesn’t work) and task_run_name
only sets the task run name, meaning it will never show up in the schematic outside of flow runs (even in flow runs, the name is only shown when clicking on each individual task card, making it hard to see an overall picture). is there any way to achieve what i’d like to do?Anna Geller
@task(task_run_name="{entity}")
def task_a(entity):
2) Use task_args
with Flow() as flow:
task_a(entity="foo", task_args={"name": "foo_task"}) # shows up as "foo_task" in the DAG
Anna Geller
Martim Lobao
01/13/2022, 12:01 PMMartim Lobao
01/13/2022, 12:01 PM