End-to-end data pipeline for scraping, transforming, enriching, and exposing analytics from Ethiopian medical Telegram channels.
π₯ Medical Telegram Analytics Pipeline
An end-to-end data engineering & analytics pipeline that ingests Telegram data, transforms it into a dimensional data warehouse, enriches it with computer vision, exposes analytical insights via an API, and orchestrates the entire workflow using Dagster.
π Project Overview
This project analyzes medical-related Telegram channels to extract insights about:
Product mentions and engagement
Channel activity and trends
Visual content usage (images)
Promotional vs non-promotional posts
The pipeline follows modern data engineering best practices:
Data Lake β Data Warehouse β Analytics API β Orchestration
Telegram Scraper
β
βΌ
Data Lake (JSON files)
β
βΌ
PostgreSQL (raw schema)
β
βΌ
dbt Transformations
(staging + star schema)
β
βΌ
YOLO Image Enrichment
β
βΌ
Analytics Data Mart
β
βΌ
FastAPI Analytical API
β
βΌ
Dagster Orchestration
π Project Structure
medical-telegram-warehouse/
βββ api/ # FastAPI application
β βββ main.py
β βββ database.py
β βββ schemas.py
βββ data/
β βββ raw/
β βββ telegram_messages/
βββ medical_warehouse/ # dbt project
β βββ dbt_project.yml
β βββ profiles.yml
β βββ models/
β β βββ staging/
β β βββ marts/
β βββ tests/
βββ src/
β βββ scrape_telegram.py
β βββ load_raw_to_postgres.py
β βββ yolo_detect.py
βββ pipeline.py # Dagster pipeline
βββ docker-compose.yml
βββ Dockerfile
βββ requirements.txt
βββ .env
βββ README.md
Task Breakdown
β
Task 1 β Data Scraping
Goal: Collect Telegram messages and media
Output: JSON files stored in a data lake structure
Scrapes messages and images from medical Telegram channels
Stores data in date-partitioned folders
Handles malformed or empty messages safely
π Example:
data/raw/telegram_messages/2026-01-15/messages.json
ask 2 β Data Modeling & Transformation (dbt)
Goal: Build a trusted analytical data warehouse
Raw Layer
raw.telegram_messages
Staging Layer
stg_telegram_messages
Cleaned fields
Type β¦