-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdag_script.py
More file actions
44 lines (38 loc) · 1.14 KB
/
Copy pathdag_script.py
File metadata and controls
44 lines (38 loc) · 1.14 KB
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
41
42
43
44
from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.python import PythonOperator
from Zipco_Foods_Extraction import run_extraction
from Zipco_Foods_Transformation import run_transformation
from Zipco_Foods_loading import run_loading
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime(2025, 2, 7),
'email': "nelxzxi@gmail.com",
'email_on_failure': False,
'email_on_retry': False,
'retries': 1,
'retry_delay': timedelta(minutes=1),
}
dag = DAG(
'zipco_foods_pipeline',
default_args=default_args,
description='This represents Zipco Foods Data Management pipeline',
schedule_interval='@daily',
)
extraction_task = PythonOperator(
task_id='Zipco_Foods_Extraction_layer',
python_callable=run_extraction,
dag=dag,
)
transformation_task = PythonOperator(
task_id='Zipco_Foods_Transformation_layer',
python_callable=run_transformation,
dag=dag,
)
loading_task = PythonOperator(
task_id='Zipco_Foods_loading_layer',
python_callable=run_loading,
dag=dag,
)
extraction_task >> transformation_task >> loading_task