Design a nightly batch ETL that ingests raw JSON logs from object storage, transforms them with Apache Spark, and loads curated tables into a warehouse. Jobs must be idempotent, observable, and recoverable after partial failure.
Functional requirements
- Ingest partitioned raw files from object storage (S3-like)
- Run Spark transformations (filter, aggregate, dedupe) on a schedule
- Load results into warehouse tables with partition keys
- Track job status, row counts, and failure reasons
Non-functional requirements
- Idempotent reruns for the same business date
- Handle late-arriving data within a configurable window
- Job completes within SLA for daily batch window