Virtual Data Cubes
A virtual data cube is a type of calculation data cube whose values are not saved to the database. Virtual data cubes can exist in intermediate/calculation and presentation cube collections.
The following table describes the characteristics of virtual data cubes and the resulting benefits to the analytic model.
| Characteristic | Benefit |
|---|---|
|
Value data of virtual data cube is not stored in the database. |
Reduces:
|
|
The analytic calculation engine does not recalculate the virtual data cube unless the virtual data cube has nonvirtual dependents. |
Reduces recalculation time. |
|
The analytic calculation engine neither allocates memory nor calculates virtual data cubes until it receives a request for recalculation of the virtual data cube. |
Reduces memory consumption and recalculation time. |
See Defining General Data Cube Properties.
When an end user loads an analytic instance, the underlying analytic model's virtual data cubes do not contain data. However, as soon as the analytic calculation engine receives a request for a virtual cube's data, the analytic calculation engine calculates the entire cube and places the totals and all nonzero values in a temporary storage area. After this point, if the application requires the data, the analytic calculation engine retrieves the data from the temporary storage area.
Virtual cube data is recalculated for these circumstances:
-
The virtual data cube's data is displayed in an analytic grid.
-
The virtual data cube is used during a step of a recalculation.
-
The virtual data cube is accessed by a user function, even if the cube's data does not appear in the application.
-
An application uses a PeopleCode program to request data from the virtual data cube.
Note:
Whenever a circumstance requires a recalculation of all the data in an analytic model (for example, when the application adds a member to a dimension), the temporary storage for all virtual data cubes is discarded. This storage is created again as needed.
Virtual data cubes have the following two restrictions. Otherwise, you can use virtual data cubes in the way you use nonvirtual data cubes.
-
Because a virtual data cube does not permanently store data, it must contain a formula to generate its data.
Note:
Deleting the formula for a virtual data cube results in an invalid analytic model.
-
A virtual data cube cannot participate in recursive or circular systems because a virtual data cube's formula cannot refer to itself, either directly or indirectly.
This restriction applies because the first time a virtual cube's data is requested, the analytic calculation engine calculates and stores the data for the entire virtual data cube. In recursive or circular systems, the analytic calculation engine cannot calculate all of the data at the same time for any given data cube.
Note:
If a virtual cube is part of a recursive or circular system, the analytic calculation engine generates an error value for all of the cube's values. Use the Recalculate function in the Analytic Calculation Engine classes to determine whether you violated this restriction. The Recalculate function returns a VIRTUAL error for the data cube cells that are affected.
PeopleSoft recommends that you create virtual data cubes when you expect the cubes to be large, sparse, and output-only, especially when a relatively small slice of the ordinary cubes is used in any given analytic instance ID. The analytic calculation engine takes a long time to recalculate nonvirtual cubes that are large, sparse, and output-only. When you make these cubes into virtual cubes, you eliminate them from the recalculation process and drastically reduce memory requirements. If an analytic instance uses only a small slice of the cube, the cube calculates on demand quickly and requires less memory because of the sparsity compression.
Virtual cubes are also useful for intermediate calculations that do not require permanent storage permanently, especially if these cubes would normally be large and sparse.
Note:
You cannot use virtual cubes for intermediate calculations that are part of a recursive or circular system.
Do not create virtual cubes out of large, dense cubes that are displayed frequently and take a long time to recalculate. Such virtual cubes cause delays when an application requests data. To be certain of recalculation time, PeopleSoft recommends that you test whether using a virtual cube causes a significant delay in the generation of data.
Intermediate virtual cubes can count as output-only cubes, as long as they do not have nonvirtual dependents. For example, you can create formulas such as the following for output-only virtual cubes:
-
This formula is for the SALARY_BY_EMPLOYEE data cube:
GROUPSUM(RCD JOB, SALARY, BUDGET_PERIOD, BUS_UNIT, EMPID, LEDGER, VERSION) -
This formula is for the BENEFITS_BY_EMPLOYEE data cube:
GROUPSUM(RCD JOB, BENEFITS, BUDGET_PERIOD, BUS_UNIT, EMPID, LEDGER, VERSION) -
This formula is for the SALARY_AND_BENEFITS_BY_EMPLOYEE data cube:
SALARY_BY_EMPLOYEE + BENEFITS_BY_EMPLOYEE
Even though SALARY_BY_EMPLOYEE and BENEFITS_BY_EMPLOYEE are used by another virtual cube, they are not recalculated by the analytic calculation engine if there are no nonvirtual dependents. For this reason, you must write the final formula for the SALARY_AND_BENEFITS_BY_EMPLOYEE data cube in this way:
GROUPSUM(RCD_JOB, SALARY, BUDGET_PERIOD, BUS_UNIT, EMPID, LEDGER, VERSION) + GROUPSUM(RCD JOB, Benefits, Budget Period, Bus Unit, EmpID, Ledger, Version)