Example Query - Teradata Vantage - Analytics Database

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
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