Lateral Joins Over JSON Arrays
Concepts covered: sqlJsonExtract
JSON schemas evolve. The product team adds a new event type with a new payload shape; a field gets renamed; a nested object reshapes into a flatter structure. The pipeline has to handle the evolution without breaking. This section covers the migration patterns. New field appears The product team adds device.os_version to the events payload. The bronze layer absorbs it (schema-on-read; no change needed). The silver layer doesn't know about it yet; downstream consumers can't query it until the silver layer is updated. The migration: add the os_version column to the silver model, redeploy, backfill the silver layer from bronze for the historical period. The backfill is the operational cost; the bronze layer's flexibility is what makes it cheap (the historical data is already in bronze). Field
About This Interactive Section
This section is part of the Semi-Structured Data: Intermediate lesson on DataDriven, a free data engineering interview prep platform. Each section includes explanations, worked examples, and hands-on code challenges that execute in real time. SQL queries run against a live database. Python runs in a sandboxed Docker container. Data modeling problems validate against interactive schema canvases. All content is framed around what data engineering interviewers actually test at companies like Meta, Google, Amazon, Netflix, Stripe, and Databricks.
How DataDriven Lessons Work
DataDriven combines four interview rounds (SQL, Python, Data Modeling, Pipeline Architecture) with adaptive difficulty and spaced repetition. Easy problems get harder as you improve. Weak concepts resurface until you master them. Your readiness score tracks progress across every topic interviewers test. Every lesson section ends with problems you solve by writing and running real code, not by picking multiple-choice answers.