PySpark data engineering interview problem. Difficulty: beginner. Pattern: Joins. About 12 minutes. Part of the Pro drill bank.
Find orders whose user_id is missing from users. Treat this as a production helper: match the contracted return shape, including empty and duplicate inputs.
Return orders with no matching users.user_id using a left anti join. Select order_id, user_id, amount. Order by order_id. Assign result.
Input: orders + users Output: order_id | user_id | amount 104 | 9 | 40.0 Only user_id 9 is absent from users.
Topics: lakebench, pyspark, left_anti.
More PySpark interview questions · All interview problems · Learn data engineering
Interview-style drill: Find orders whose user_id is missing from users.
Return orders with no matching `users.user_id` using a left anti join. Select `order_id`, `user_id`, `amount`. Order by `order_id`. Assign `result`.