The JSON Files That Became a Data Mart
A medium Data Modeling interview practice problem on DataDriven. Write and execute real data modeling code with instant feedback.
- Domain
- Data Modeling
- Difficulty
- medium
- Seniority
- L5
Problem
A retail client delivers three daily JSON feeds from its e-commerce platform, every record keyed by a string source ID like 'ORD-20260401-0042', and wants them turned into a relational data mart whose joins run on the warehouse's own integer keys with the source IDs kept alongside. Orders arrive as `{order_id, customer:{id, name, email}, line_items:[{product_id, qty, price}], status}`; products as `{product_id, name, categories:[{id, name, parent_id}]}`, where `parent_id` chains categories up to three levels deep; and shipments as `{shipment_id, order_id, address:{street, city, country}, status_history:[{status, timestamp}]}`, where one order can span several shipments. Design the dimensional schema that captures every order, line item, product category, shipment, and shipment status transition.
Summary
Three semi-structured inputs. One queryable warehouse.
Practice This Problem
Solve this Data Modeling problem with real code execution. DataDriven runs your solution and checks it automatically.