How sayedelmasry2/real-time-big-data-platform works
This repository implements a local real-time medallion lakehouse: synthetic and external data enter through batch or Kafka ingestion, land in Bronze, are conformed in Silver, and feed Gold analytics, reconciliation, and Power BI exports. Airflow schedules the pipeline runner, which owns the staged transformation and quality workflow. The README documents Trino, dbt, and observability capabilities; where their wiring is not shown in sampled code, relationships are documented rather than inferred. Some ingestion, streaming, and serving paths are represented at subsystem level because their implementation was not sampled.
Main entry points: pipeline_runner.py Pipeline Runner · catalog.py Iceberg Catalog · stream_consumer.py Stream Consumer · bronze_ddl.py Bronze Tables
Components 24
Data Ingestion
- Synthetic Generator
data/generators/generator.py - External Extractors
src/ingestion - Kafka Backbone
- Stream Consumer
src/streaming/stream_consumer.py - Dead Letter Queue
- Raw Archiver
src/storage/raw_archiver.py - Spark Order Stream
src/streaming/orders_stream.py
Lakehouse Storage
- Bronze Tables
src/lakehouse/bronze_ddl.py - Iceberg Catalog
src/lakehouse/catalog.py
Pipeline Processing
- Pipeline Runner
src/services/pipeline_runner.py - Silver Transformations
src/transformations/silver_layer.py - Quality Gate
src/quality/dq_runner.py - Gold Aggregations
src/transformations/gold_aggregations.py - dbt Transformations
src/transformations/dbt_runner.py
Analytics and BI
- Trino Client
src/analytics/trino_client.py - Trino SQL Engine
- Financial Reconciliation
src/analytics/reconciliation.py - Power BI Export
scripts/export_to_powerbi.py
Operations and Monitoring
- Airflow Scheduler
airflow/dags - Metrics Exporter
src/observability/metrics_exporter.py
Other components
- Data Producer
- Object Storage
- Power BI Reports
- Prometheus and Grafana
Connections 33
- Data Producer → Synthetic Generator: generates data
- Synthetic Generator → Kafka Backbone: publishes events
- Data Producer → External Extractors: requests source data
- External Extractors → Object Storage: archives extracts
src/ingestion/dummyjson_extractor.py - Kafka Backbone → Stream Consumer: delivers events
- Stream Consumer → Dead Letter Queue: routes invalid records
src/streaming/stream_consumer.py - Stream Consumer → Bronze Tables: writes events
src/streaming/stream_consumer.py - Stream Consumer → Raw Archiver: archives raw data
- Raw Archiver → Object Storage: writes raw files
src/storage/raw_archiver.py - Bronze Tables → Iceberg Catalog: registers tables
src/lakehouse/bronze_ddl.py - Airflow Scheduler → Pipeline Runner: schedules pipeline
- Pipeline Runner → Silver Transformations: runs transformations
src/services/pipeline_runner.py - Pipeline Runner → Quality Gate: runs quality checks
src/services/pipeline_runner.py - Pipeline Runner → Gold Aggregations: runs aggregations
src/services/pipeline_runner.py - Pipeline Runner → dbt Transformations: runs dbt
src/services/pipeline_runner.py - Pipeline Runner → Financial Reconciliation: runs audit
src/services/pipeline_runner.py - Pipeline Runner → Power BI Export: exports datasets
src/services/pipeline_runner.py - Bronze Tables → Silver Transformations: conforms data
- Silver Transformations → Gold Aggregations: feeds marts
- Gold Aggregations → Iceberg Catalog: stores Iceberg tables
src/transformations/gold_aggregations.py - Silver Transformations → Iceberg Catalog: reads and writes tables
src/transformations/silver_layer.py - Quality Gate → Iceberg Catalog: validates tables
src/quality/dq_runner.py - dbt Transformations → Trino SQL Engine: transforms with
- Trino Client → Trino SQL Engine: executes queries
src/analytics/trino_client.py - Financial Reconciliation → Iceberg Catalog: reads lakehouse data
src/analytics/reconciliation.py - Financial Reconciliation → Trino Client: queries analytics
- Power BI Export → Iceberg Catalog: reads datasets
scripts/export_to_powerbi.py - Power BI Export → Power BI Reports: serves exports
- Metrics Exporter → Prometheus and Grafana: exports metrics
- Metrics Exporter → Iceberg Catalog: observes lakehouse
src/observability/metrics_exporter.py - Metrics Exporter → Stream Consumer: observes streaming
src/observability/metrics_exporter.py - Kafka Backbone → Spark Order Stream: streams orders
- Spark Order Stream → Bronze Tables: loads Bronze