Input
The input table is aggregate_clicks, from LAG and LEAD Expressions Example: No Alias for Input Query.
SQL-MapReduce Call
SELECT * FROM nPath ( ON aggregate_clicks PARTITION BY sessionid ORDER BY clicktime USING Mode (NONOVERLAPPING) Pattern ('A*') Symbols (TRUE AS A) Result ( FIRST (sessionid OF A) AS sessionid, ACCUMULATE (pagetype OF A) AS path ) ) AS dt ORDER BY dt.sessionid;
Output
sessionid | path |
---|---|
1 | [home, home1, page1, home, home1, page1, home, home, home, home1, page1, checkout, home, home, home, home, home, home, home, home, home] |
2 | [home, home, home, home, home, home, home, home, home, home1, page1, checkout, checkout, home, home] |
3 | [home, home, home, home, home, home, home, home, home1, page1, home, home1, page1, home] |
4 | [home, home, home, home, home, home, home1, home1, home1, page1, page1, page1] |
5 | [home, home, home, home, home1, home1, home1, page1, page1, page1, page2, page2, page2, checkout, checkout, checkout, page2, page2, page2] |