1.1 - 8.10 - FrequentPaths Example: ClosedPattern ('true') - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)

Input

SQL Call

SELECT * FROM FrequentPaths(
  ON bank_web_clicks1 AS InputTable
  OUT TABLE OutputTable(output6)
  USING
  PartitionColumns('session_id')
  TimeColumn('datestamp')
  ItemColumn('page')
  MinSupport(2)
  ClosedPattern('true')
) AS dt ;

Output

 message                           
 --------------------------------- 
 Finished. 26 patterns were found.

SELECT CAST(pattern AS varchar(500)), support, length FROM output6 ORDER BY 3 DESC, 2 DESC;

 pattern                                                                         support length 
 ------------------------------------------------------------------------------- ------- ------ 
 account summary;account summary;account summary;account history;account summary       2      5
 account summary;account summary;faq;account summary;account summary                   2      5
 account summary;account summary;account summary;account summary                       3      4
 account summary;account summary;account history;account summary                       3      4
 account summary;account summary;account summary;funds transfer                        2      4
 account summary;faq;funds transfer;account summary                                    2      4
 account summary;account history;account summary;account history                       2      4
 account summary;funds transfer;view deposit details;account history                   2      4
 account summary;faq;account summary;view deposit details                              2      4
 account summary;faq;account history;view deposit details                              2      4
 account summary;account summary;account history;faq                                   2      4
 account summary;account history;account summary;faq                                   2      4
 account summary;faq;account history;account summary                                   2      4
 account summary;faq;funds transfer;view deposit details                               2      4
 account summary;account history;account summary                                       4      3
 account summary;funds transfer;view deposit details                                   3      3
 account summary;faq;account summary                                                   3      3
 account summary;account summary;faq                                                   3      3
 account summary;faq;view deposit details                                              3      3
 account summary;faq;faq                                                               2      3
 account summary;account history;funds transfer                                        2      3
 account summary;account history                                                       5      2
 account summary;faq                                                                   5      2
 account summary;view deposit details                                                  4      2
 account summary;funds transfer                                                        4      2
 account summary                                                                       6      1

Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.