Example Query - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢
SELECT * FROM Sessionize (ON td2 USING TimeCol('eventinfo') timeout(30))
AS J1;

CREATE SET TABLE UT1.td2 ,NO FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT,
     DEFAULT MERGEBLOCKRATIO
     (
     guid INTEGER,
     payload VARCHAR(2048) CHARACTER SET LATIN NOT CASESPECIFIC,
     eventinfo TIMESTAMP(6))
;

SELECT guid, sessionid FROM Sessionize (ON td2 USING 
TimeCol('eventinfo') timeout(30)) AS J1;

Result:

*** Query completed. 5 rows found.

       GUID    SessionID
-----------  -----------
         33            1
         33            2
         33            2
         33            2
         33            3
SELECT * FROM td2;

Result:

*** Query completed. 5 rows found.

       guid  payload                         eventinfo
-----------  ------------------------------  ---------
         33  http://dougfy.wikidot.com/debu  2013-06-09 20:21:44.000000
         33  http://dougfy.wikidot.com/debu  2013-06-10 19:08:55.000000
         33  http://dougfy.wikidot.com/debu  2013-06-10 19:09:01.000000
         33  http://dougfy.wikidot.com/debu  2013-06-10 19:09:04.000000
         33  http://dougfy.wikidot.com/debu  2013-06-10 19:09:41.000000