1.0 - 8.00 - PathSummarizer Example - Teradata Vantage

Teradata® Vantage Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.0
8.00
Release Date
May 2019
Content Type
Programming Reference
Publication ID
B700-4003-098K
Language
English (United States)

Input

SQL Call

SELECT * FROM PathSummarizer (
  ON PathGenerator (
    ON clickstream1
    USING
    SeqColumn ('path')
    Delimiter (',')
  ) PARTITION BY prefix
  USING
  SeqColumn ('sequence')
  PrefixColumn ('prefix')
  PartitionNames ('prefix')
  Delimiter(',')
  CountColumn ('cnt')
  HashCode ('false')
) AS dt ORDER BY node, cnt ASC;

Output

node parent children cnt depth prefix
^,A ^ [(^,A,H),(^,A,P)] 11 1 ^,A
^,A,H ^,A [(^,A,H,C),(^,A,H,P)] 5 2 ^,A,H
^,A,H,C ^,A,H [(^,A,H,C,$)] 3 3 ^,A,H,C
^,A,H,C,$ ^,A,H,C   3 4 ^,A,H,C
^,A,H,P ^,A,H [(^,A,H,P,$)] 2 3 ^,A,H,P
^,A,H,P,$ ^,A,H,P   2 4 ^,A,H,P
^,A,P ^,A [(^,A,P,S)] 6 2 ^,A,P
^,A,P,S ^,A,P [(^,A,P,S,O)] 6 3 ^,A,P,S
^,A,P,S,O ^,A,P,S [(^,A,P,S,O,)] 6 4 ^,A,P,S,O
^,C ^ [(^,C,S)] 1 1 ^,C
^,C,S ^,C [(^,C,S,O)] 1 2 ^,C,S
^,C,S,O ^,C,S [(^,C,S,O,E)] 1 3 ^,C,S,O
^,C,S,O,E ^,C,S,O [(^,C,S,O,E,$)] 1 4 ^,C,S,O,E
^,C,S,O,E,$ ^,C,S,O,E   1 5 ^,C,S,O,E
^,H ^ [(^,H,A),(^,H,C),(^,H,E)] 20 1 ^,H
^,H,A ^,H [(^,H,A,C),(^,H,A,P)] 6 2 ^,H,A
^,H,A,C ^,H,A [(^,H,A,C,P)] 4 3 ^,H,A,C
^,H,A,C,P ^,H,A,C [(^,H,A,C,P,I)] 4 4 ^,H,A,C,P
^,H,A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