Example: Populate a File System Information Table for SHOWWHERE and SPOOL CLASS Output, 'S' Option - 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™

Create target table and populate data into the table for short 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','s','td_map1');
exec dbc.populatefsysinfotable('dbc','classspool','showwhere','s','db','spools');
sel * from db.spools;

Result:

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

Display data for short 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','s','','');

Result:

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