From b4a4d3256f1e515086cbffe6a0f105e0ea930bf5 Mon Sep 17 00:00:00 2001 From: Sara Vallero Date: Thu, 11 Jan 2024 15:45:36 +0100 Subject: [PATCH] Hello world DAG --- hello_world_dag.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 hello_world_dag.py diff --git a/hello_world_dag.py b/hello_world_dag.py new file mode 100644 index 0000000..1b82d3c --- /dev/null +++ b/hello_world_dag.py @@ -0,0 +1,20 @@ +from airflow import DAG +from airflow.operators.python import PythonOperator +from datetime import datetime + +def helloWorld(): + print(‘Hello World’) + +with DAG(dag_id="hello_world_dag", + start_date=datetime(2021,1,1), + schedule_interval="@hourly", + catchup=False) as dag: + + task1 = PythonOperator( + task_id="hello_world", + python_callable=helloWorld) + +task1 + + +