prasanna Kumar
prasanna Kumar

Reputation: 291

airflow.exceptions.AirflowException: Cycle detected in DAG. Faulty task

i am running the airflow pipeline but codes looks seems good but actually i'm getting the airflow.exceptions.AirflowException: Cycle detected in DAG. Faulty task: can u please help to resolve this issue

Upvotes: 13

Views: 20324

Answers (3)

Elena Manole
Elena Manole

Reputation: 19

On top of the two flags mentioned above, this could also be due to a newly added task that has a trigger rule associated to it (maybe even refers an upstream task using .output)

Examples that could lead to airflow.exceptions.AirflowException: Cycle detected in DAG: trigger_rule=TriggerRule.ALL_DONE or TASK_MAP[EMR_SERVERLESS_APP_TASK].output

Upvotes: 0

Sunil Kumar Jhajhria
Sunil Kumar Jhajhria

Reputation: 289

This can happen due to duplicate task_id'a in multiple tasks.

Upvotes: 28

faeder
faeder

Reputation: 71

Without the code, it's kind of hard to help you. However, this means that you have a loop in your DAG. Generally, thie error happens when one of your task has a downstream task whose own downstream chain includes it again (A calls B calls C calls D calls A again, for example). That's not permitted by Airflow (and DAGs in general).

Upvotes: 7

Related Questions