Given events, return rows where event_type = 'purchase'. Project event_id, user_id, platform and order by event_id ascending.
| event_id | user_id | event_type | platform |
|---|---|---|---|
| 1 | 6 | view | Web |
| 2 | 13 | logout | iOS |
| 3 | 16 | view | Web |
| 4 | 7 | click | Android |
| 5 | 17 | view | Android |
| 6 | 12 | click | iOS |
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
events10 rows| event_id (int) | user_id (int) | event_type (string) | platform (string) |
|---|---|---|---|
| 1 | 6 | view | Web |
| 2 | 13 | logout | iOS |
| 3 | 16 | view | Web |
| 4 | 7 | click | Android |
| 5 | 17 | view | Android |
| 6 | 12 | click | iOS |
| 7 | 8 | view | iOS |
| 8 | 18 | click | Web |
| 9 | 11 | click | Android |
| 10 | 20 | signup | Web |
Column names and order must match. Sort order is specified in the question.