LedgerForge is a production-grade Data project focused on solving real-world data engineering problems such as data skew, deduplication, late-arriving data, SCD Type 2 dimensions, and performance trade-offs at scale.
It simulates realistic banking datasets with millions of records and embedded data quality issues to force correct and scalable Spark design.
- Work with large datasets (10M–50M+ rows)
- Practice correctness-first data engineering
- Understand Spark execution plans, shuffles, and skew
- Explore trade-offs between performance and accuracy
- Apache Spark (Batch)
- Scala
- Parquet
- Local mode (Mac M1, 16GB RAM)
- IntelliJ IDEA
- Maven
All datasets are synthetically generated using Spark, not static CSVs.
- ~50 million rows
- Partitioned by
event_date - Intentional issues:
- duplicate transaction IDs
- skewed account distribution
- late-arriving data
- Stored as Parquet
- Slowly Changing Dimension (Type 2)
- Multiple versions per customer
- Used for temporal joins
- Account → customer mapping
- Status lag and inconsistencies included
- Slowly changing attributes
- Highly skewed distribution
- Realistic parsing and data quality issues
LedgerForge embeds real production failure modes, including:
- Duplicate facts requiring deduplication
- Late-arriving events that invalidate historical aggregates
- Skewed joins causing shuffle imbalance
- Memory-heavy aggregations (
countDistinct) - Malformed input records
- Ambiguous business logic
This project is designed to solve (not yet solved):
- Deduplicate transactions correctly and efficiently
- Compute daily customer spend with late data
- Perform SCD2 temporal joins at scale
- Handle skewed joins without brute-force repartitioning
- Analyze Spark UI and execution plans
- Balance correctness vs performance trade-offs
Example:
mvn clean package
java -cp target/ledger-forge-*.jar com.ledgerforge.pipeline.Main --env dev