Range of values for TD_TIMECODE and TD_SEQNO Columns Example | Teradata Vantage - Example: Get the Valid Range of Values for the TD_TIMECODE and TD_SEQNO Columns - Analytics Database - Teradata Vantage

Time Series Tables and Operations

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-10-30
dita:mapPath
tuc1628112453431.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
sfz1493079039055
lifecycle
latest
Product Category
Teradata Vantageā„¢
Create table MyDB.ocean_buoy (
TD_TIMEBUCKET BIGINT NOT NULL GENERATED SYSTEM TIMECOLUMN,
TD_TIMECODE TIMESTAMP(6) NOT NULL GENERATED TIMECOLUMN,
TD_SEQNO INTEGER NOT NULL GENERATED TIMECOLUMN,
BuoyID INTEGER,
Temperature INTEGER NOT NULL)
PRIMARY TIME INDEX (TIMESTAMP(6), DATE '2016-01-01', HOURS(1), SEQUENCED);
 
exec DBC.TD_TIMESERIES_RANGE('MyDB.ocean_buoy');

Result:

TD_TIMECODE_RANGE 
----------------------------------------------------                                                                                        
TD_TIMECODE  BETWEEN TIMESTAMP '2016-01-0100:00:00.000000+00:00' AND
TIMESTAMP '2030-08-1214:23:21.842737+00:00'
                                                                                                          
TD_SEQNO_RANGE 
----------------------------------------------------  
TD_SEQNO  BETWEEN 1  AND 20000
 
-- you can specify the table name in the macro and will get the same output as above example.
 
exec DBC.TD_TIMESERIES_RANGE('ocean_buoy');