As asked
Design a daily ETL pipeline that reads raw JSON events from S3, performs joins with reference data, aggregates by user and day, and writes Parquet to a data warehouse. Address schema evolution, partitioning strategy, and failure recovery.
Sample answer outline
Use Spark on EMR or Databricks. Partition input S3 data by date for predicate pushdown. Broadcast join for small reference tables. Schema evolution: use Delta Lake or Iceberg for ACID writes and schema merging. Partition output by (year, month, day) for efficient downstream queries. Failure recovery: write to a staging location first, then atomic move; use job checkpointing or idempotent job IDs. A strong answer covers data quality checks (Great Expectations or dbt tests) and monitoring via Spark metrics.
Expect these follow-ups
- How does Delta Lake handle schema evolution differently from plain Parquet on S3?
- What happens if the job fails halfway through writing output partitions?