Add Target Value Trigger

<< Click to Display Table of Contents >>

Current:  Schedule Tasks > Trigger 

Add Target Value Trigger

Previous pageReturn to chapter overviewNext page

The target value trigger refers to set the aggregate calculation method (such as maximum value and minimum value) of certain indexes as triggering conditions in the data set. 

The steps to create a new target value trigger are as follows:

1.Set the basic information of the trigger, including the trigger name, storage path and description of the trigger.

2.The selection type is "Target Value Trigger".

触发器2

3.Select the existing data set in the system.

4.Select the data column in the data set. The system will determine whether to trigger the task based on whether the calculated value of the data column reaches the target value.

触发器4

5.Set the calculation method to perform corresponding aggregation calculation on the columns in the data set. Different data types have different aggregate calculations.The string, character, Boolean, time, date, and timestamp columns only support five types of aggregate calculation methods: maximum, minimum, count, different value count, and accurate different value count;Byte, integer, short (long) integer, single (double) precision columns support 23 kinds of aggregate calculation methods such as total, average, maximum, minimum, count, and different value count.

触发器3

6.Set the target value. The user can click the "Add" button to add a new target value, and can also edit an existing target value. The target value can be added with one or more target values, or the target value can be set within a range.

触发器5

7.Set the script. The user can dynamically control the parameters through the script to achieve control of the columns in the trigger. The script has the highest priority when executing this trigger. Only one form of param[XX]="xx" is supported.

8.Setting parameters. Collect parameters in the data set or add new ones.

 

Example:

An administrator needs to count the total sales of the company. When the total sales of the company exceeds a certain value, the job execution is triggered, and the company sales table is sent to the designated person's mailbox by mail. Then the trigger settings are as shown below:

触发器示例1

When a trigger is set for this job, the trigger is executed first when the job is executed. If the total sales amount of the day reaches the target value, the trigger runs, the job will be executed successfully, and the sales table will be sent to the designated person's mailbox; if the total sales amount of the day does not reach the target value, the trigger will fail, the job will fail to execute, and the designated person will not receive the sales table. Therefore, the current sales situation can be known by the operation of the job.