From 02be95b52c29ead31da5b3cc03d7eced2abbe134 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 11 Dec 2025 04:02:03 +0000 Subject: [PATCH] Add dags/example_dag.py --- dags/example_dag.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 dags/example_dag.py diff --git a/dags/example_dag.py b/dags/example_dag.py new file mode 100644 index 0000000..d327240 --- /dev/null +++ b/dags/example_dag.py @@ -0,0 +1,29 @@ +from airflow import DAG +from airflow.operators.python import PythonOperator +from datetime import datetime, timedelta + +def my_task(): + print("Hello Airflow! Task 2 is running.") + +default_args = { + 'owner': 'airflow', + 'depends_on_past': False, + 'retries': 1, + 'retry_delay': timedelta(minutes=5), +} + +with DAG( + 'example_dag', + default_args=default_args, + description='My second DAG', + start_date=datetime(2025, 12, 10), + schedule=timedelta(minutes=3), + catchup=False, +) as dag: + + task1 = PythonOperator( + task_id='print_hello', + python_callable=my_task + ) + + task1