6.2.3 Defining a Materialized View Update Condition
You can create conditions for a Data Block which determine how and when the Data Block's materialized view is updated. (See Incrementally Updating a Materialized View in Administration Reference for background on incremental updates.)
To specify the materialized view update conditions for a Data Block, follow the steps below:

1. Press the 'Condition' button located in the upper right corner of the Data Block title bar. This opens the 'Conditions' dialog box.
2. Select the MV Update tab.

3. Press the 'Edit' button corresponding to the type of update condition you wish to create. The available options are as follows:
a. Append Records Matching Pre-aggregate Condition: Create a condition which selects records to add to the existing materialized view based on the pre-aggregate values of data (prior to grouping and summarization).
b. Append Records Matching Post-aggregate Condition: Create a condition which selects records to add to the existing materialized view based on the post-aggregate values of data (subsequent to grouping and summarization).
c. Delete Records Matching Pre-aggregate Condition: Create a condition which selects records to delete from the existing materialized view based on the pre-aggregate values of data (prior to grouping and summarization).
d. Delete Records Matching Post-aggregate Condition: Create a condition which selects records to delete from the existing materialized view based on the post-aggregate values of data (subsequent to grouping and summarization).
When you press the desired 'Edit' button, this opens the 'Conditions' dialog box.
4. Use the menus to enter the desired condition. (See Defining Simple Conditions for general information on specifying conditions.)

If you select the 'Expression' option for the right side of the condition, follow the additional steps below:

The 'sql/js' option is not available for deletions. Deletion expressions must use JavaScript syntax.
a. For append operations, press the 'sql/js' button to select the desired expression language, SQL or JavaScript.
b. Press the 'Edit Expression' button (fx). This opens the Formula Editor.
c. Enter the desired expression. You can use any available functions and operators, in addition to the special parameters MV.LastUpdatedTime, MV.MaxValue, and MV.MinValue. See Special Parameters for Materialized View Update Conditions for more details.
d. Press 'OK' to close the Formula Editor.
5. Press 'OK' to close the 'Condition' dialog box.
The specified condition(s) will be evaluated when any materialized view based on this Data Block is regenerated. The materialized view will be updated in accordance with the conditions specified. In general, incrementally updating a materialized view in this way is significantly faster than regenerating the materialized view in its entirety.
| << Pre-aggregate, Post-aggregate, and Ranking Conditions | © 1996-2013 InetSoft Technology Corporation (v11.4) | Special Parameters for Materialized View Update Conditions >> |