The customers table lists customers and the orders table lists their purchases. Some customers have never ordered.
Use a left join and return customer_id, customer_name, country for customers with no matching order. Sort by customer_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
customers5 rows| customer_id (int) | customer_name (string) | country (string) |
|---|---|---|
| 1 | Maya | India |
| 2 | Leo | Germany |
| 3 | Nina | Canada |
| 4 | Omar | UAE |
| 5 | Sara | India |
orders4 rows| order_id (int) | customer_id (int) | amount (double) |
|---|---|---|
| 1001 | 1 | 40 |
| 1002 | 1 | 25 |
| 1003 | 3 | 80 |
| 1004 | 5 | 12.5 |
Column names and order must match. Sort order is specified in the question.