The inventory table stores current stock and the reorder level for each product.
Return every product whose stock is at or below its reorder level, with columns product_id, product_name, stock, reorder_level. Sort by product_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
inventory6 rows| product_id (int) | product_name (string) | stock (int) | reorder_level (int) |
|---|---|---|---|
| 1001 | Espresso Beans | 8 | 12 |
| 1002 | Paper Cups | 40 | 25 |
| 1003 | Oat Milk | 5 | 10 |
| 1004 | Vanilla Syrup | 14 | 14 |
| 1005 | Cocoa Powder | 3 | 6 |
| 1006 | Cold Brew | 30 | 20 |
Column names and order must match. Sort order is specified in the question.