Hard PySpark problems
23 hard PySpark coding problems for senior data engineer interviews. Write DataFrame code and get graded instantly.
- Conversion Funnel · Hard · Aggregations, Conditional Logic
- Price Valid at Order Time (Range Join) · Hard · Joins, Null Handling, Filtering & Selection
- Reconcile Two Sources (Full Outer Join) · Hard · Joins, Null Handling, Conditional Logic, 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
- Monthly Retention by Cohort · Hard · Joins, Aggregations, Dates, Null Handling, Filtering & Selection
- Three-Day Login Streak · Hard · Window Functions, Aggregations, Dates, Filtering & Selection
- Trailing 3 Calendar Days (Range Frame) · Hard · Window Functions, Dates, Filtering & Selection
- Forward-Fill Missing Readings · Hard · Window Functions
- Sessionize a Clickstream · Hard · Window Functions, Dates, Null Handling, Conditional Logic, Filtering & Selection
- Consecutive Status Runs (Gaps and Islands) · Hard · Window Functions, Aggregations
- Build an SCD Type 2 History · Hard · Window Functions, Null Handling, Filtering & Selection
- Upsert: Merge New Records into a Table · Hard · Window Functions, Filtering & Selection
- Subtotals with ROLLUP · Hard · Pivot, Unpivot & Rollup, Aggregations, Conditional Logic, Filtering & Selection
- All Combinations with CUBE · Hard · Pivot, Unpivot & Rollup, Aggregations, Conditional Logic
- Pivot with Several Aggregations · Hard · Pivot, Unpivot & Rollup, Aggregations, Null Handling
- Find Hot Keys and Plan Salting · Hard · Spark Performance, Joins, Aggregations
- Apply a CDC Batch (MERGE Semantics) · Hard · Lakehouse, Window Functions, Joins
- Net Changes from a Change Feed · Hard · Lakehouse, Aggregations, Conditional Logic
- What Changed Between Two Versions · Hard · Lakehouse, Joins, Strings
- Trending Searches in Sliding Windows · Hard · Streaming, Aggregations, Filtering & Selection
- Fit Conversations into a Context Window · Hard · Data Prep for AI, Window Functions, Joins
- Build Preference Pairs from Ratings · Hard · Data Prep for AI, Window Functions, Joins
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