Concepts & ArchitectureLesson 04
Airflow Web UI vs. CLI
Web interface.
Access via browser:
http://localhost:8080
Essential CLI Commands
Docker Access
# Enter the Airflow container
docker compose exec -it airflow-webserver bash
Installing Python Packages
Airflow tasks run inside Airflow containers, so any extra Python library must be available inside those containers before the DAG runs.
For a quick local test, open the Airflow webserver container and install the package manually:
docker compose exec airflow-webserver bash
pip install pandas
For a repeatable Docker setup, place the package requirement in your .env file or in the docker-compose.yml environment section, then restart the Airflow containers.
# .env file style
_PIP_ADDITIONAL_REQUIREMENTS=pandas
# docker-compose.yml environment style
_PIP_ADDITIONAL_REQUIREMENTS: "pandas"
System Diagnosis
# Show environment, DB, and executor info
airflow info
# Show help menu
airflow -h
# Check DAGs folder location
cat airflow.cfg | grep "dags_folder = "
Executor
cat airflow.cfg | grep "executor = "
airflow info | grep executor
DAG Management
# Check Python syntax errors in DAG file
python3 my_dag.py
# List all loaded DAGs
airflow dags list
# List DAGs that failed to load (syntax/import errors)
airflow dags list-import-errors
Testing & Execution
# Test a specific task WITHOUT saving to DB
airflow tasks test <dag_id> <task_id> <date>
# Example:
airflow tasks test crypto_pipeline fetch_prices 2026-04-20
# Manually trigger a full DAG run
airflow dags trigger -e <date> <dag_id>