30. Reconcile Two Sources (Full Outer Join)
Difficulty: Hard · Topics: Joins, Null Handling, Conditional Logic, Filtering & Selection
An advanced problem: unlock it to open the statement, sample data and editor. Graded on 3 test cases.
Learn the concepts
- The medallion architecture · 6 min read. Bronze, silver and gold layers: what belongs in each, and where the pattern goes wrong.
- when / otherwise · 4 min read. CASE WHEN logic inside a column: first match wins, and a missing otherwise means null.
- join · 5 min read. Combine DataFrames on a key: inner, left, right and full joins, and the duplicate-key fan-out trap.
PySpark functions you'll practise
- join
- isNull
- isNotNull
- when / otherwise
- filter
- withColumn
Related problems
- Monthly Retention by Cohort · Hard · Joins, Aggregations, Dates, Null Handling, Filtering & Selection
- Fill Missing Dates (Calendar Spine) · Hard · Joins, Arrays, Aggregations, Dates, Null Handling, Filtering & Selection
- Customers Who Bought Every Product · Hard · Joins, Aggregations, Filtering & Selection
- Price Valid at Order Time (Range Join) · Hard · Joins, Null Handling, Filtering & Selection
- Year-over-Year Growth · Medium · Joins, Filtering & Selection
Browse
Topics: Window Functions · Joins · Aggregations · Pivot, Unpivot & Rollup · Arrays · Null Handling · Conditional Logic · Dates · Filtering & Selection · Strings · Data Lake · Lakehouse · Streaming · Data Prep for AI · Spark Performance
Difficulty: Easy · Medium · Hard · Learn · All problems · dbt practice