Automated hourly ETL pipeline for Lagos, Nigeria weather data β Python, SQL, Apache Airflow, Snowflake & Databricks
# π€οΈLagos Weather ETL Pipeline
An automated data engineering pipeline that extracts real-time weather data
for Lagos, Nigeria, transforms it into a structured format, and loads it into
Snowflake β orchestrated hourly with Apache Airflow.
---
## Architecture
OpenWeatherMap API β Python ETL β Apache Airflow β Snowflake
---
## π οΈ Tech Stack
| Layer | Tool |
|----------------|-------------------------|
| Data Source | OpenWeatherMap API |
| Language | Python 3.12 |
| Orchestration | Apache Airflow 2.9.1 |
| Data Warehouse | Snowflake |
| Environment | Ubuntu/WSL |
---
## π Project Structure
```
weather_pipeline/
βββ airflow/
β βββ dags/
β βββ weather_dag.py # Airflow DAG β orchestrates ETL hourly
βββ notebooks/
β βββ weather_etl_databricks.py # Databricks notebook version
βββ scripts/
β βββ __init__.py
β βββ extract.py # Pulls data from OpenWeatherMap API
β βββ transform.py # Cleans and structures raw data
β βββ load.py # Loads data into Snowflake
βββ snowflake/
β βββ weather_table.sql # Snowflake table setup script
βββ .env.example # Credentials template
βββ .gitignore # Ignores .env and sensitive files
βββ requirements.txt # Python dependencies
βββ test_pipeline.py # Manual end-to-end test script
βββ README.md
```
---
## βοΈ Setup Instructions
### 1. Clone the repo
```bash
git clone
github.com
cd weather-pipeline
```
### 2. Create and activate virtual environment
```bash
python3 -m venv weather_venv
source weather_venv/bin/activate
```
### 3. Install dependencies
```bash
pip install -r requirements.txt
```
### 4. Create your `.env` file
```bash
cp .env.example .env
# Fill in your API keys and Snowflake credentials
```
### 5. Set up Snowflake table
Run the SQL in ` β¦