Previous Page | Next Page

Updating SAS OLAP Cubes

Incremental Updates of Cubes and Cube Generations

When you create a SAS OLAP cube, data from a table is summarized and sub-aggregates are created for the cube. The Incremental Update function enables you to create an incremental update or copy of the original cube. This is known as a generation of the cube. A generation is a complete, independent version of the original cube, with a separate metadata registration and separate sets of member and property trees. The new generation shares the original data (previous aggregation data) rather than maintaining duplicate copies.

The new cube generation enables the original cube to remain online for queries during the entire update process. This is because the original cube is not modified. The original cube continues in production as before while the new cube is available for administrative review and updates (such as security updates or new global calculated members). This provides the administrator with an opportunity to examine and verify the correctness of the updates before bringing the cube online for production without affecting the original cube. A new cube generation also provides the additional benefit of keeping historical data (in the form of the previous generations) available for as long as necessary.

You can update a cube incrementally by using the OUTCUBE or the OUTSCHEMA options. These options are used with the ADD_DATA option to signal that an update will occur and a new generation of the cube will be created. You can use either option separately or both together.


OUTCUBE Option

Here is an example of the OUTCUBE option. In this example, the cube PRODSCHEMA is updated and a cube generation (TSTCUBE) is created in the same schema as the original cube.

proc olap fact=olapsio.factcars cube=PRODCUBE 
		       OUTCUBE=TSTCUBE 	
		       ADD_DATA; 
	metasvr host=&host port=&port protocol=&protocol userid=&userid pw=&pw 	
    repository=&repos olap_schema=PRODSCHEMA; 
run; 


OUTSCHEMA Option

You can also create a generation of a cube by specifying a different schema than the original cube. In this example, the new cube retains the name of the original cube PRODCUBE (OUTCUBE was not specified). However, the new cube now resides in the schema TESTSCHEMA, as specified in the OUTSCHEMA option.

proc olap fact=olapsio.factcars cube=PRODCUBE 
		      OUTSCHEMA=TESTSCHEMA 
		      ADD_DATA; 
	metasvr host=&host port=&port protocol=&protocol userid=&userid pw=&pw 			
    repository=&repos olap_schema=PRODSCHEMA; 
run; 


OUTCUBE and OUTSCHEMA Options

You can use both OUTCUBE and OUTSCHEMA options to create a new cube in a different schema. In this example, a new cube called TSTCUBE is created and it resides in the schema TESTSCHEM.

proc olap fact=olapsio.factcars cube=PRODCUBE 
		       OUTSCHEMA=TESTSCHEMA 
		       OUTCUBE=TSTCUBE 
		       ADD_DATA; 
	metasvr host=&host port=&port protocol=&protocol userid=&userid pw=&pw 			
    repository=&repos olap_schema=PRODSCHEMA; 
run; 

The possible functions that you can perform on a SAS OLAP cube depend on whether the cube is the original cube or a generation of a cube. These functions can also depend on which generation of the original cube it is. Any generation of a cube can have calculated members added to or deleted from it. However, only the most current cube generation can be edited, rebuilt, tuned, or updated. You can add data to cubes that are created in SAS 9.2. A cube built in SAS 9.1.3 must be rebuilt in SAS 9.2 in order to use the Incremental Update function. Furthermore, you must have ReadMetadata and WriteMetadata permissions for all elements of the cube. See Generating a New Cube for a discussion of creating a cube generation with the SAS OLAP Cube Studio Incremental Update Wizard.

Note:   The SAS OLAP Cube Studio right-click menu options for Edit, Create, Manual Tuning, Advanced Tuning, and Delete Physical Cube are not active if the cube is not the current generation.  [cautionend]

Previous Page | Next Page | Top of Page