Create After-Update Trigger
The MaxL create after update trigger statement helps you create or replace a trigger to track state changes over a selected Essbase cube area. The trigger is activated after a data update operation completes.
Triggers help you track whether designated constraints are violated during updates (events) in the area, and allow you to specify resultant actions to execute if violations are detected.
Minimum permission required: Database Manager.
Create an after-update trigger if you want the trigger to be activated after the entire data update operation is completed. This is the only type of trigger supported in aggregate storage mode. When after-update triggers are used, the trigger fires when an update operation on level-0 data cells is complete, and the update operation as a whole has met any condition specified for the cube area.
Note:
You cannot create or replace a trigger during a calculation, data update, or data load.
Note:
If a calculation assigns the same value to a given cell as was already present before the calculation, then triggers for that cell will not activate. In other words, if cell values are not changed, blocks are not marked as dirty, and triggers for those blocks are not activated, even if the trigger condition was otherwise met.
Keywords
Use the MaxL create after update trigger statement to create a trigger in the following ways:
- create or replace after update trigger TRIGGER-NAME...
-
Create a new after-update trigger.
- create or replace after update trigger TRIGGER-NAME...
-
Create an after-update trigger, or replace an existing trigger of the same name.
- create after update trigger...where <cube area>...
-
The where clause is how you define the area of the cube to be tracked. Use a valid, symmetric MDX Slicer Specification.
- create after update trigger...when <condition>...
-
The when clause is how you define the condition to be tested. Use the keyword WHEN followed by a valid MDX conditional expression. To test for a condition, you can use MDX conditional and logical operators,Boolean functions, and MDX iterative functions.
- create after update trigger...then <action>...
-
The then clause is how you define the action to be taken if the WHEN condition is met. Refer to examples in Examples of Triggers.
- create after update trigger...end
-
The END keyword must terminate every create trigger statement.
Example
create or replace after update trigger Sample.Basic.WestColas where (Jan, Sales, Actual, [100], West) when Jan < 1500 then spool WestColas_Fail end;