Is it possible to give a custom name a task that i...
# ask-community
j
Is it possible to give a custom name a task that is used in multiple places in the workflow to give a differentiation in
flow.visualize()
c
Hi John - if you’re using the functional API you can provide new task initialization arguments with each call via the
task_args
keyword. Search
task_args
on this page to see some examples: https://docs.prefect.io/core/tutorials/task-guide.html
upvote 1
n
Hi @John Ramirez! Yes it is possible, here's an example:
Copy code
class YourTask(Task):
    def run(self):
        return

with Flow("Your Flow") as YourFlow:
  yourTask_1 = YourTask(name="yourTask_1")