-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
41 lines (31 loc) · 760 Bytes
/
test.py
File metadata and controls
41 lines (31 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from datetime import timedelta, datetime
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
""" TERCERA PARTE AIRFLOW """
""" APARTADO 1) """
default_args = {
'owner': 'airflow',
'depends_on_past': False,
# ¿Sería necesario empezar desde 1900??
#'start_date': datetime(1900, 1, 1),
'start_date': datetime(2020, 11, 21),
'retries': 1,
'retry_delay': timedelta(seconds=5)
}
dag = DAG(
'test',
default_args=default_args,
description='A simple test DAG',
#https://crontab.guru/ --> 3:00 UTC,
schedule_interval='0 3 * * *',
)
""" APARTADO 2) """
start = DummyOperator(
task_id='start',
dag=dag,
)
end = DummyOperator(
task_id='end',
dag=dag,
)
start >> end