17.10 - Example: Using QryLogObjectsV - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Administration
Programming Reference
Publication ID
B035-1092-171K
Language
English (United States)

The following SELECT statement retrieves the object information of a query:

SELECT QueryID, ObjectDatabaseName (Named ObjDBName), ObjectTableName (Named ObjTblName), ObjectColumnName (Named ObjColName), ObjectID (Named ObjId), ObjectNum (Named ObjNum), ObjectType (Named ObjType), FreqofUse
FROM DBC.QryLogObjectsV where queryid = 201205134619838031;

Result:

QueryID            ObjDBName    ObjTblName  ObjColName ObjID    ObjNum   ObjType  FreqofUse
------------------ -----------  ----------  ---------- -------- -------  -------- ------
201205134619838031 D_PERSONNEL  ?            ?         00001604   0        DB      1
201205134619838031 D_PERSONNEL  DEPARTMENT   ?         00009005   0        Tab     1
201205134619838031 D_PERSONNEL  DEPARTMENT   DeptNo    00009005   1,025    Col     2
201205134619838031 D_PERSONNEL  DEPARTMENT   DeptName  00009005   1,026    Col     1
201205134619838031 D_PERSONNEL  DEPARTMENT   EmpCount  00009005   1,027    Col     1
201205134619838031 D_PERSONNEL  DEPARTMENT   Loc       00009005   1,028    Col     1