1.1 - 8.10 - nPath Example: Mode (OVERLAPPING) - 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)

SQL Call

SELECT * FROM NPath@coprocessor (
  ON aggregate_clicks PARTITION BY sessionid ORDER BY clicktime
  USING
    Mode (overlapping)
    Pattern ('A.A')
    Symbols (TRUE AS A)
    Result (FIRST(sessionid OF A) AS sessionid,
            accumulate(pagetype OF A) AS path)
) AS dt ORDER BY sessionid;

Output

 sessionid path                 
 --------- -------------------- 
         1 [home, home]        
         1 [home, home]        
         1 [home, home]        
         1 [home, home]        
         1 [checkout, home]    
         1 [page1, checkout]   
         1 [home1, page1]      
         1 [home, home1]       
         1 [home, home]        
         1 [home, home]        
         1 [page1, home]       
         1 [home, home1]       
         1 [page1, home]       
         1 [home1, page1]      
         1 [home, home1]       
         1 [home1, page1]      
         1 [home, home]        
         1 [home, home]        
         1 [home, home]        
         1 [home, home]        
         2 [checkout, checkout]
         2 [home1, page1]      
         2 [home, home1]       
         2 [home, home]        
         2 [home, home]        
         2 [home, home]        
         2 [home, home]        
         2 [home, home]        
         2 [home, home]        
         2 [home, home]        
         2 [home, home]        
         2 [page1, checkout]   
         2 [checkout, home]    
         2 [home, home]        
         3 [home, home1]       
         3 [home1, page1]      
         3 [home, home1]       
         3 [home, home]        
         3 [home, home]        
         3 [home, home]        
         3 [home, home]        
         3 [home, home]        
         3 [home, home]        
         3 [home, home]        
         3 [page1, home]       
         3 [home1, page1]      
         3 [page1, home]       
         4 [home1, page1]      
         4 [home1, home1]      
         4 [home, home1]       
         4 [home, home]        
         4 [home, home]        
         4 [home, home]        
         4 [home, home]        
         4 [home, home]        
         4 [home1, home1]      
         4 [page1, page1]      
         4 [page1, page1]      
         5 [checkout, page2]   
         5 [checkout, checkout]
         5 [page2, checkout]   
         5 [page2, page2]      
         5 [page1, page2]      
         5 [page1, page1]      
         5 [page1, page1]      
         5 [home1, page1]      
         5 [home1, home1]      
         5 [home1, home1]      
         5 [home, home1]       
         5 [home, home]        
         5 [home, home]        
         5 [home, home]        
         5 [page2, page2]      
         5 [checkout, checkout]
         5 [page2, page2]      
         5 [page2, page2]

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