Adding a Stored Procedure Rule
Scenario
RTDService allows you to calculate stored procedure rules with PL/SQL syntax. You can define stored procedure rules so that real-time message data can be calculated and processed based on the rules to generate real-time decisions.
Procedure
- Log in to the RTD web UI as a service user and select the tenant to be operated. For details, see section Accessing the RTDService Web UI.
- Choose Business Management > Variable Rule Configuration > Stored Procedure Rules.
- Click Add and set the parameters required for defining the stored procedure rule.
Table 1 Parameters of stored procedure rules Parameter
Description
Event Source
Event source type of the rule
Dimension Name
Dimension of the rule
Name
Name of the rule
NOTE:- The prefix must be pr_.
- The rule name is case insensitive and must start with a letter or underscore (_). The value must contain no more than 30 characters, including letters, digits, and underscores (_).
Priority
Rule priority. The value ranges from 1 to 2147483647.
Rule Type
- General rule: The rule can be used to calculate each packet (all traffic) after been brought online.
- Gray rule: You need to set the traffic proportion.
- If the stored procedure rule is brought online before it is published, it is used in a calculation based on the configured traffic proportion.
- If the stored procedure rule is brought online after it is published, it is used to calculate each packet (all traffic). To do so, click Publish Rule in the Operation column of the desired rule, click OK, and then bring the rule online.
- Challenger rule: You need to set a traffic proportion and the champion rule that will be challenged. After a new rule goes online, it challenges the existing rule within the limit of the configured traffic proportion. You can click Challenge Successfully in the Operation column to switch between the challenger rule and the champion rule. The champion rule is the currently effective stored procedure rule.
Traffic Percentage
Data distribution ratio
- If Gray Rule is selected, the value is an integer and the range is (0, 99].
- If Challenger Rule is selected, the value is an integer and the range is [0, 100].
Challenge Successfully
Stored procedure rule (the champion rule) that will be challenged This parameter is mandatory when Challenger Rule is selected.
SQL
SQL code of the rule
Description
Rule description
Click Check Syntax, set the values of the variables used in the rule, and click Check Syntax.
If the check fails, modify the code as prompted and perform the check again.
- After your code passes the syntax check, click OK to add the stored procedure rule.
Select the rule on the Stored Procedure Rules page and choose More > Online or Offline to bring the rule online or take it offline.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot