Week 11 Extra: Apache Airflow for ETL Pipelines
DSAN 6000: Big Data and Cloud Computing
Fall 2026
Extra Writeups
Concepts \(\leadsto\) Code
start-airflow.sh
airflow db migrate
airflow api-server --port 8080
airflow scheduler
airflow dag-processor
airflow triggerer- Full Airflow βecosystemβ is running once youβve started each piece via above (
bash) commands! - Letβs look at each in turnβ¦

db migrate: The Airflow Metastore
start-airflow.sh
- General info used by DAGs: variables, connections, XComs
- Data about DAG and task runs (generated by scheduler)
- Logs / error information
- Not modified directly/manually! Managed by Airflow; To modify, use API Server β
API Server
start-airflow.sh
Web UI for managing Airflow (much more on this later!)
Warning Default Login Info
Default db migrate generates admin password in ~/simple_auth_manager_passwords.json.generated

Scheduler β Executor
start-airflow.sh
- Default:
LocalExecutor - For scaling:
EcsExecutor(AWS ECS),KubernetesExecutor - See also
SparkSubmitOperator

DAG Processor
start-airflow.sh

The schedule Argument
(Airflow uses pendulum under the hood, rather than datetime!)
dag_scheduling.py
from airflow.sdk import DAG
import pendulum
dag = DAG("regular_interval_cron_example", schedule="0 0 * * *", ...)
dag = DAG("regular_interval_cron_preset_example", schedule="@daily", ...)
dag = DAG("regular_interval_timedelta_example", schedule=pendulum.timedelta(days=1), ...)Cron: Full-on scheduling language (used by computers since 1975!)
crontab.sh
# ββββββββββββββ minute (0β59)
# β ββββββββββββββ hour (0β23)
# β β ββββββββββββββ day of the month (1β31)
# β β β ββββββββββββββ month (1β12)
# β β β β ββββββββββββββ day of the week (0β6) (Sunday to Saturday)
# β β β β β
# β β β β β
# β β β β β
# * * * * * <command to execute>Cron Presets: None, "@once", "@continuous", "@hourly", "@daily", "@weekly"
External Service Integration
| Service | Command |
|---|---|
| AWS | pip install 'apache-airflow[amazon]' |
| Azure | pip install 'apache-airflow[microsoft-azure]' |
| Databricks | pip install 'apache-airflow[databricks]' |
| GitHub | pip install 'apache-airflow[github]' |
| Google Cloud | pip install 'apache-airflow[google]' |
| MongoDB | pip install 'apache-airflow[mongo]' |
| OpenAI | pip install 'apache-airflow[openai]' |
| Slack | pip install 'apache-airflow[slack]' |
| Spark | pip install 'apache-airflow[apache-spark]' |
| Tableau | pip install 'apache-airflow[tableau]' |
(And many more:)
Jinja Example
homepage.jinja
<h4>{{ me['name'] }}'s Favorite Hobbies</h4>
<ul>
{%- for hobby in hobbies %}
<li>{{ hobby }}</li>
{%- endfor %}
</ul>render_jinja.py
from jinja2 import Template
tmpl = Template('homepage.jinja')
tmpl.render(
me = {'name': 'Jeff'},
hobbies = [
'eat',
'sleep',
'attend to the proverbial bag'
]
)rendered.html
<h4>Jeff's Favorite Hobbies</h4>
<ul>
<li>eat</li>
<li>sleep</li>
<li>attend to the proverbial bag</li>
</ul>\(\leadsto\)
Jeff's Favorite Hobbies
- eat
- sleep
- attend to the proverbial bag
Airflow UI: Grid View

Airflow UI: Run Details

Airflow UI: Task Instance Details

Tasks β Task Groups

Graph View

Calendar View

Gantt View

New Book: Up-To-Date (Airflow 3.0) Demos π€
Conceptual Pipelines \(\leadsto\) DAGs
Main challenge: converting βintuitiveβ pipelines in our heads:

Into DAGs with concrete Tasks, dependencies, and triggers:

Implementation Detail 1: Backfilling

Implementation Detail 2: Train Model Only After Backfill
Implementation Detail 3: Downstream Consumers

References
Harenslak, Bas P., and Julian de Ruiter. 2021. Data Pipelines with Apache Airflow. Simon and Schuster.
Ruiter, Julian de, Ismael Cabral, Kris Geusebroek, Daniel van der Ende, and Bas Harenslak. 2026. Data Pipelines with Apache Airflow, Second Edition. Simon and Schuster.



