Examples | Heatmap Table Function and Macro | Teradata Vantage - Example: Using the tdheatmap Function - Analytics Database - Teradata Vantage

SQL Operators and User-Defined Functions

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
2024-04-05
dita:mapPath
xub1628111590556.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
drp1544241916620
lifecycle
latest
Product Category
Teradata Vantage™

You can use the tdheatmap function to return just a few important columns, like the table name, cylinder ID, and temperature.

SELECT date TheDate,
       t1.ampnumber,
       dbase.databasenamei DatabaseName, 
       tvm.tvmnamei TableName, 
       to_byte(t1.cylinderidmsw) || to_byte(t1.cylinderidlsw) CylinderId,
       t1.temperature
FROM TABLE(tdheatmap(2)) AS t1,
     dbc.tvm tvm,
     dbc.dbase dbase
WHERE t1.starttableiduniq = tvm.tvmid
AND   tvm.databaseid = dbase.databaseid;
TheDate AmpNumber DatabaseName TableName CylinderId Temperature
11/10/2016 2 TD_SYSFNLIB BITNOT 00-06-00-02-00-00-00-05 10.58
11/10/2016 2 DW123 ALPHA 00-06-00-02-00-00-00-46 10
11/10/2016 2 TD_SYSFNLIB WEEKNUMBER_ OF_ CALENDAR_TSWZ 00-06-00-02-00-00-00-45 17.83
11/10/2016 2 DW123 ALPHA 00-06-00-02-00-00-00-49 10
11/10/2016 2 DBC CHANGEDROWJOURNAL 00-06-00-02-00-00-00-21 10.06
11/10/2016 2 DW123 ALPHA 00-06-00-02-00-00-00-4A 10
11/10/2016 2 DBC ALL 00-06-00-02-00-00-00-23 10
11/10/2016 2 DW123 ALPHA 00-06-00-02-00-00-00-47 10
11/10/2016 2 DBC TVFIELDS 00-06-00-02-00-00-00-3A 10.21
11/10/2016 2 DW123 MILLIONS 00-06-00-02-00-00-00-4B 10
11/10/2016 2 DW123 ALPHA 00-06-00-02-00-00-00-48 10
11/10/2016 2 DW123 ALPHA 00-06-00-02-00-00-00-4E 10