GitHub user appassionate closed a discussion: Is possible to add a loop 
condition in Airflow?

### how about a operator for "clear"
According to the "Directed Acyclic Graph " (DAG) concept, we will not get a 
explict loop flow graph in our dag or webserverUI.
For a loop condition I am always faced with such a condition:

### BAD DAG
[do a task] >> is_result_ok? >> no >> continue [do a task]    (which is not 
DAG!)
is_result_ok >> Yes >> end_loop  



### GOOD DAG
I believe  we CAN NOT add “>> do a task“ in the downstream for it has occured 
in the upstream. 
BUT, it is possible that we can "CLEAR" the previous task just like we do in UI 
sometimes.

So, solution might be: 
[do a task] >> is_result_ok? >> no >> clear_previous_do_a_task (it is DAG, it 
might be a special operator)
is_result_ok >> Yes >> end_loop  

### Is this feasible?
it will be tricky:
1. to have such a "evalute" section
2.  how to prepare next "do a task" parameters for we have to change to reach 
the good condition.


GitHub link: https://github.com/apache/airflow/discussions/21726

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to