hey all, is there a way to run only specific tasks...
# ask-community
a
hey all, is there a way to run only specific tasks using tags from a flow? imagine our flow splits after a specific tag, treating two different datasets
Copy code
task_1 -> task_2 -> [task_a, task_b] # i.e. task_a and task_b are independent of each other but share the same dependencies
if we define tasks as such:
Copy code
task_1: [a, b]
task_2: [a, b]
task_a: [a]
task_b: [b]
Is there anything like:
Copy code
prefect run --tags=a
I am really asking for functionalities I was using with
kedro
here :p
k
Hello @Andreas Tsangarides, I don’t think our semantics seamlessly support this, but it can be done with conditional logic and parameters. The
case
task is like an if else so you can do something like:
Copy code
with Flow(...) as flow:
    a = Parameter(...)
    
    with case(a, True):
        task_1()
        task_2()

    task_a()
    task_b()
🙌 1
a
thanks!