Example: Populate a File System Information Table for SHOWWHERE and SPOOL CLASS Output, 'L' Option - Advanced SQL Engine - Teradata Database

SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2023-04-27
dita:mapPath
fsi1592016213432.ditamap
dita:ditavalPath
fsi1592016213432.ditaval
dita:id
B035-1210
lifecycle
previous
Product Category
Teradata Vantage™

Create target table and populate data into the table for large display output. Several columns on the right side of the output are not included because of space constraint.

exec dbc.createfsysinfotable('db','spools','perm','y','showwhere','l','td_map1');
exec dbc.populatefsysinfotable('dbc','classspool','showwhere','l','db','spooll');
sel * from db.spooll;

   Date            Time  DB Name        Tbl Name          TID TID_TAI Vproc Drive Lrg Cyls Sml Cyls TableType     Grade   Grade(%)
-------- --------------- ------- --------------- ------------ ------- ----- ----- -------- -------- ---------    ------   --------
21/01/13 05:21.36.000000 DBC     CLASS SPOOLPOOL 000000000000       0     1     5        0        0     SPOOLPOOL SLOW        .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOLPOOL 000000000000       0     1     5        0        0     SPOOLPOOL FAST        .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOL     000000000000       0     1     5        0        0     SPOOL     MEDIUM      .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOL     000000000000       0     1     5        0        0     SPOOL     SLOW        .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOLPOOL 000000000000       0     1     5        0        0     SPOOLPOOL MEDIUM      .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOL     000000000000       0     1     5      342        0     SPOOL     LOCAL    100.00
21/01/13 05:21.36.000000 DBC     CLASS SPOOL     000000000000       0     1     5        0        0     SPOOL     FAST        .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOLPOOL 000000000000       0     0     2        0        0     SPOOLPOOL SLOW        .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOLPOOL 000000000000       0     0     2        0        0     SPOOLPOOL MEDIUM      .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOLPOOL 000000000000       0     0     2        0        0     SPOOLPOOL FAST        .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOL     000000000000       0     0     2      342        0     SPOOL     LOCAL    100.00
21/01/13 05:21.36.000000 DBC     CLASS SPOOL     000000000000       0     0     2        0        0     SPOOL     SLOW        .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOL     000000000000       0     0     2        0        0     SPOOL     MEDIUM      .00
21/01/13 05:21.36.000000 DBC     CLASS SPOOL     000000000000       0     0     2        0        0     SPOOL     FAST        .00

Display data for long display with output to the screen. Several columns on the right side of the output are not included because of space constraint.

exec dbc.populatefsysinfotable('dbc','classspool','showwhere','l','','');


   Date            Time  DB Name        Tbl Name          TID TID_TAI Vproc Drive Lrg Cyls Sml Cyls TableType     Grade   Grade(%)
-------- --------------- ------- --------------- ------------ ------- ----- ----- -------- -------- ---------    ------   --------
21/01/13 02:04.57.000000 DBC     CLASS SPOOL     000000000000       0     0     2                       SPOOL     FAST          
21/01/13 02:04.57.000000 DBC     CLASS SPOOL     000000000000       0     0     2      342              SPOOL     LOCAL    100.00
21/01/13 02:04.57.000000 DBC     CLASS SPOOL     000000000000       0     0     2                       SPOOL     MEDIUM        
21/01/13 02:04.57.000000 DBC     CLASS SPOOL     000000000000       0     0     2                       SPOOL     SLOW          
21/01/13 02:04.57.000000 DBC     CLASS SPOOL     000000000000       0     1     5                       SPOOL     FAST          
21/01/13 02:04.57.000000 DBC     CLASS SPOOL     000000000000       0     1     5      342              SPOOL     LOCAL    100.00
21/01/13 02:04.57.000000 DBC     CLASS SPOOL     000000000000       0     1     5                       SPOOL     MEDIUM        
21/01/13 02:04.57.000000 DBC     CLASS SPOOL     000000000000       0     1     5                       SPOOL     SLOW          
21/01/13 02:04.57.000000 DBC     CLASS SPOOLPOOL 000000000000       0     0     2                       SPOOLPOOL FAST          
21/01/13 02:04.57.000000 DBC     CLASS SPOOLPOOL 000000000000       0     0     2                       SPOOLPOOL MEDIUM        
21/01/13 02:04.57.000000 DBC     CLASS SPOOLPOOL 000000000000       0     0     2                       SPOOLPOOL SLOW          
21/01/13 02:04.57.000000 DBC     CLASS SPOOLPOOL 000000000000       0     1     5                       SPOOLPOOL FAST          
21/01/13 02:04.57.000000 DBC     CLASS SPOOLPOOL 000000000000       0     1     5                       SPOOLPOOL MEDIUM        
21/01/13 02:04.57.000000 DBC     CLASS SPOOLPOOL 000000000000       0     1     5                       SPOOLPOOL SLOW