loader

Malaysia Weather Data Engineering Pipeline

Cloud-based ETL pipeline with API integration, Azure data lake, and real-time weather analytics

Classification: Cloud ETL
Architecture: API to Cloud Lake to Database
Platform: Microsoft Azure

Overview

This is a comprehensive end-to-end cloud-based data engineering project that demonstrates modern data pipeline architecture using Microsoft Azure. The system extracts real-time weather data from multiple Malaysian cities via REST APIs, transforms and cleans the data using Python pandas, stores raw and processed data in Azure Blob Storage with a partitioned data lake structure, loads the processed data into PostgreSQL, and visualizes insights using Power BI.

This project demonstrates cloud data engineering, data lake architecture, ETL pipeline design, API integration, and automated data processing workflows relevant to junior data engineering roles and cloud learning paths.

Malaysia Weather Data Pipeline

System Architecture

Cloud Data Lake Architecture

Open-Meteo API (Real-time weather data)   ↓
Python Extract Module   ↓
Raw CSV Files   ↓
Azure Blob Storage (Raw Data Layer)   ↓
Python Transform Module   ↓
Cleaned/Processed CSV Files   ↓
Azure Blob Storage (Processed Data Layer)   ↓
PostgreSQL Database (Structured)   ↓
Power BI Dashboard (Visualization)

Pipeline Flowchart Animation

Flowchart Animation

Key Features

API Integration

Extracts real-time weather data from Open-Meteo REST API for multiple Malaysian cities without authentication.

Cloud Data Lake

Stores raw and processed data in Azure Blob Storage with partitioned structure by year, month, and day.

ETL Pipeline

End-to-end Extract, Transform, Load pipeline with data cleaning, validation, and enrichment.

Data Partitioning

Organized data lake structure enables efficient querying and cost optimization in cloud storage.

Automation

Automated scheduling with Python scheduler for continuous data collection and processing.

Analytics Ready

Loads processed data into PostgreSQL and exports to formats compatible with Power BI dashboards.

Technology Stack

Python

Core language for API calls, data extraction, transformation, and ETL orchestration.

Pandas

Data manipulation library for cleaning, transforming, and aggregating weather data.

REST API

Open-Meteo API for retrieving real-time weather data without authentication requirements.

Azure Blob Storage

Cloud object storage for storing raw and processed data in a partitioned data lake structure.

PostgreSQL

Relational database for storing structured, processed weather data for analytics.

Docker

Containerization for reproducible deployment of Python services in cloud or local environments.

Python Scheduler

APScheduler or similar for automating pipeline runs on a schedule (hourly, daily, etc.).

Power BI

Business intelligence tool for creating dashboards and real-time weather visualizations.

Cloud Data Lake Structure

weather-data/ │ ├── raw/ │ └── year=2026/ │ └── month=04/ │ └── day=29/ │ └── weather_raw_120530.csv │ └── processed/ └── year=2026/ └── month=04/ └── day=29/ └── weather_cleaned_120530.csv
Dataset Fields
Column Description Type
city Malaysian city name (Kuala Lumpur, Penang, etc.) String
latitude City geographic latitude coordinate Float
longitude City geographic longitude coordinate Float
temperature_c Current temperature in Celsius Float
humidity_percent Relative humidity percentage (0-100) Integer
precipitation_mm Precipitation level in millimeters Float
weather_code WMO weather condition code Integer
timestamp Data collection timestamp (UTC) DateTime

Project Components

Core Modules
  • main.py - Main entry point orchestrating the entire ETL pipeline
  • api.py - Handles REST API calls to Open-Meteo for weather data extraction
  • src/extract.py - Extracts raw data from API and stores in Azure Blob Storage
  • src/transform.py - Cleans and transforms raw data, adds business logic
  • src/load.py - Loads processed data into PostgreSQL database
  • airflow/ or scheduler/ - DAG definitions for Apache Airflow or APScheduler orchestration
  • docker-compose.yml - Multi-service orchestration: API, storage, database
Malaysian Cities Covered
Kuala Lumpur, Penang, Johor Bahru, Petaling Jaya, Subang Jaya, Cyberjaya, Klang, Selangor, Georgetown, Shah Alam, Putrajaya, and more...

Getting Started

Prerequisites
  • Python 3.8+
  • Azure account with Blob Storage access
  • PostgreSQL database (local or cloud)
  • Docker & Docker Compose (optional)
  • Git for cloning repository
Installation & Setup
  1. Clone the repository
    git clone https://github.com/amfarhnn/malaysia-weather-data-pipeline.git cd malaysia-weather-data-pipeline
  2. Install Python dependencies
    pip install -r requirements.txt
  3. Configure Azure credentials (create .env file)
    AZURE_STORAGE_CONNECTION_STRING=your_connection_string AZURE_CONTAINER_NAME=weather-data DB_HOST=localhost DB_NAME=weather_db DB_USER=postgres DB_PASSWORD=your_password
  4. Configure PostgreSQL connection in config.py
    python src/config.py
  5. Run the extraction script (fetch weather data)
    python main.py --extract
  6. Run the transformation script (clean and process)
    python main.py --transform
  7. Run the load script (push to database)
    python main.py --load
  8. Run the scheduled workflow with Airflow (optional)
    airflow dags trigger weather_pipeline_dag

Results & Achievements

10+
Malaysian Cities
Scheduled
Workflow Automation
Validated
Data Quality Checks
Cloud
Azure Storage Layer

Demonstrates expertise in: Cloud data engineering, API integration, data lake architecture, ETL pipeline automation, Azure cloud services, real-time data processing, and production-style data infrastructure.