티스토리 뷰
728x90
from datetime import datetime
from airflow.exceptions import AirflowSkipException
from airflow.models import DAG
from airflow.operators.dummy import DummyOperator
from airflow.operators.python import PythonOperator
with DAG(
dag_id="mydag",
start_date=datetime(2022, 1, 18),
schedule_interval="@once"
) as dag:
def task_b():
raise AirflowSkipException
A = DummyOperator(task_id="A")
B = PythonOperator(task_id="B", python_callable=task_b)
C = DummyOperator(task_id="C", trigger_rule="none_failed")
A >> B >> C
How to skip a task in airflow without skipping its downstream tasks?
Let’s say this is my dag: A >> B >> C If task B raises an exception, I want to skip the task instead of failing it. However, I don’t want to skip task C. I looked into AirflowSkipExcept...
stackoverflow.com
728x90
'공부' 카테고리의 다른 글
[docker] M1 MacOSX - no matching manifest for linux/arm64/v8 in the manifest list entries (0) | 2022.05.23 |
---|---|
[gradle] mavenCentral(), jCenter(), mavenLocal(), gradlePluginPortal() (0) | 2022.05.23 |
[Airflow] raise AirflowSkipException (0) | 2022.05.23 |
[Sh] array contains (0) | 2022.05.23 |
[Spring] kafka config (0) | 2022.05.22 |
[logback] kafka-appender (0) | 2022.05.22 |
댓글
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- 142,048
- Today
- 28
- Yesterday
- 221
TAG
- follower
- 김달
- 유투브
- Bot
- wlw
- 인스타그램
- 책그림
- 메디파크 내과 전문의 의학박사 김영수
- 어떻게 능력을 보여줄 것인가?
- 팔로워 수 세기
- Kluge
- 개리마커스
- 연애학개론
- COUNT
- 클루지