17.10 - Workload Management: Ruleset APIs - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Application Programming Reference

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

The following discusses APIs for performing ruleset operations without using Viewpoint Workload Designer. More specifically:

  • Create or replace a TASM rule.
  • Delete a TASM rule.
  • Manage a rule (for example, enable or disable).
  • Activate a ruleset.

Currently, only system throttle and meter rules are supported.

The APIs are external stored procedures (XSPs).

An entry is logged in the DBC.TDWMEventLog table when one of the XSPs is successfully completed.

To create a system throttle or meter rules:

  1. If you are creating a throttle or an arrival rate meter (ARM) for a specific ruleset, retrieve the desired ruleset or config name from the TDWM.Configurations table. Use ‘ALLRULESETS’ as the ruleset name to create the same throttle or ARM in all existing rulesets.
  2. Call TDWM.TDWMCreateSystemThrottle (or TDWM.TDWMCreateArrivalRateMeter) to create a system throttle or an ARM without any qualification criteria in one or all existing rulesets.
  3. Call TDWM.TDWMAddClassificationForRule to add a classification criterion for a system throttle or an ARM in one or all existing rulesets. This step is repeated for each additional classification criterion, if necessary.
  4. [Optional] Call TDWM.TDWMAddClassificationForTarget to add a sub-criterion for a Target group classification in one or all existing rulesets. This step is repeated for each sub-criterion, if necessary.
  5. Call TDWM.TDWMAddLimitForRuleState to add the default limit or a query limit for a specific state. This step can be repeated for each state. At least one of these calls must specify the default limit.
  6. Call TDWM.TDWMManageRule to enable the new system throttle or ARM in one or all existing rulesets.
  7. [Optional] Call the XSP TDWM.TDWMActivateRuleset to activate an updated ruleset with the new system throttle or ARM.

See Examples.

These APIs directly modify a ruleset or rulesets in the TDWM database so they are not immediately visible through Viewpoint Workload Designer. You need to copy the modified ruleset or rulesets from the Ready section to the Working section to make the changes visible.