Examples: TDWM.ClassificationForRuleV - Teradata VantageCloud Lake

Lake - Monitor Resources and Performance

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
wyu1683671641248.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
wyu1683671641248

Example 1: List classification criteria of rules in the ruleset 'TestConfig'

Query

SELECT RuleType, RuleName, ClassificationType AS ClassType, 
       ClassificationOperator AS ClassOp, ClassificationValue AS ClassValue, 
       ClassificationTarget AS ClassTarget
FROM TDWM.ClassificationForRuleV
WHERE Rulesetname = 'TestConfig'
ORDER BY RuleType, RuleName;

Output

RuleType         RuleName         ClassType        ClassOp  ClassValue           ClassTarget
---------------  ---------------  ---------------  -------  -------------------  -----------
Filter           FTS_Filter       TABLE            I        DB1.VLTABLE          Y
...
System Throttle  AllUsers         USER             I        USER*                N
System Throttle  Huge_Join        TABLE            I        DB2.HUGETABLE        Y
...
Workload         H-WD             ACCTSTR          I        $H*                  N
...
Workload         MM               MINTOTALTIME     I        10                   N
Workload         MM               MAXTOTALTIME     I        50                   N
...
Workload         TC               MAXTOTALTIME     I        1                    N
Workload         TC               ALLAMP           I        N                    N
...
Workload         TDaaS_High       QUERYBAND        I        TDaaS_Priority=High  N
Workload         TDaaS_High       USER             I        TDaaS*               N
...

Example 2: Add classification criteria to new system throttle

This example illustrates step #2 in Example setup: Recreate/Clone a System Throttle (Add the same classification criteria of 'TableA_FTS' in 'TestRuleset' to the new throttle).

BTEQ script

/*****************************************************************
* Step 2:  Add rule classification criteria
*****************************************************************/

.SET TITLEDASHES OFF
.EXPORT DATA FILE=TDWM_RuleInfo_Temp_P2.exp
SELECT RuleName               (TITLE ''),
       ClassificationType     (TITLE ''),
       ClassificationValue    (TITLE ''),
       ClassificationOperator (TITLE ''),
       ClassificationDesc     (TITLE '')
FROM TDWM.ClassificationForRuleV
WHERE RulesetName = 'TestRuleset'
  AND RuleType = 'System Throttle'
  AND RuleName = 'TableA_FTS';
.EXPORT RESET

.SET TITLEDASHES ON
.IMPORT DATA FILE=TDWM_RuleInfo_Temp_P2.exp;
.REPEAT *
using (RuleName                 VARCHAR(30), 
       ClassificationType       VARCHAR(20),
       ClassificationValue      VARCHAR(30), 
       ClassificationOperator   VARCHAR(6),
       ClassificationDesc       VARCHAR(80))
CALL TDWM.TDWMAddClassificationForRule(
     'ProdRuleset'              /* RulesetName */,
     :RuleName                  /* RuleName */,
     :ClassificationDesc        /* Description */,
     :ClassificationType        /* ClassificationType */,
     :ClassificationValue       /* ClassificationValue */,
     :ClassificationOperator    /* ClassificationOperator */,
     'N'                        /* ReplaceOption */);
.IMPORT RESET

Result

'TableA_FTS' in 'ProdRuleset' has the same classification criteria as 'TableA_FTS' in 'TestRuleset' except for ClassificationTarget value. The reason is that sub-criteria have not been added to 'TableA_FTS' in 'ProdRuleset' (step #3 of the process - Adding the same classification sub-criteria of 'TableA_FTS' in 'TestRuleset' to the new throttle), addressed in Example 2 in TDWM.ClassificationForTargetV.

Querying the view TDWM.ClassificationForRuleV returns the following results for the source and new throttle.

           RulesetName TestRuleset
              RuleName TableA_FTS
    ClassificationType APPL
   ClassificationValue WebApp
ClassificationOperator I
    ClassificationDesc
  ClassificationTarget N
           RulesetName TestRuleset
              RuleName TableA_FTS
    ClassificationType TABLE
   ClassificationValue myDB.TableA
ClassificationOperator I
    ClassificationDesc
  ClassificationTarget Y


           RulesetName ProdRuleset
              RuleName TableA_FTS
    ClassificationType APPL
   ClassificationValue WebApp
ClassificationOperator I
    ClassificationDesc
  ClassificationTarget N
           RulesetName ProdRuleset
              RuleName TableA_FTS
    ClassificationType TABLE
   ClassificationValue myDB.TableA
ClassificationOperator I
    ClassificationDesc
  ClassificationTarget N                 (no sub-criteria)