22 lines
594 B
Python
22 lines
594 B
Python
from datetime import datetime, timedelta
|
|
from airflow import DAG
|
|
from airflow.operators.python import PythonOperator
|
|
|
|
default_args = {
|
|
"owner": "data-team",
|
|
"retries": 2,
|
|
"retry_delay": timedelta(minutes=5),
|
|
"email_on_failure": True,
|
|
"email": ["data-alerts@nexus.local"],
|
|
}
|
|
|
|
with DAG(
|
|
"events_etl",
|
|
default_args=default_args,
|
|
description="Nightly events ETL from S3 to Redshift",
|
|
schedule_interval="0 1 * * *",
|
|
start_date=datetime(2024, 9, 1),
|
|
catchup=False,
|
|
tags=["etl", "events"],
|
|
) as dag:
|
|
pass # operators wired in separate task modules
|