Skip to content

Commit 143585d

Browse files
coder2jcoder2j
coder2j
authored and
coder2j
committed
MINOR: Add Tutorial of Airflow catchup and backfill
1 parent 4e9c0a0 commit 143585d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

dags/dag_with_catchup_and_backfill.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from datetime import datetime, timedelta
2+
3+
from airflow import DAG
4+
from airflow.operators.bash import BashOperator
5+
6+
7+
default_args = {
8+
'owner': 'coder2j',
9+
'retries': 5,
10+
'retry_delay': timedelta(minutes=5)
11+
}
12+
13+
with DAG(
14+
dag_id='dag_with_catchup_backfill_v02',
15+
default_args=default_args,
16+
start_date=datetime(2021, 11, 1),
17+
schedule_interval='@daily',
18+
catchup=False
19+
) as dag:
20+
task1 = BashOperator(
21+
task_id='task1',
22+
bash_command='echo This is a simple bash command!'
23+
)

0 commit comments

Comments
 (0)