Default Elements in Dimensions

When a dimension is added to a cube, a Default Write Element must be defined for this dimension. Existing cube data will then be assigned to this element. If a dimension is removed from a cube, the dimension must have a defined Default Read Element. The values that are read from this element will then be reserved.

For example, if you remove a Months dimension from a cube in which “Total Year” was defined as the Default Read Element, the cube values that are stored in the In-Memory DB will then be those of “Total Year”.

Default elements can be defined for every dimension in the dimension properties under Settings. It is not technically required to set all default elements. However, it is recommend that in situations where a default read element is defined, a default write element should also be defined.

The various types of default elements are described below.

Total element
Used in dimension uploads. If the source file for the upload has elements without a parent, these elements will be assigned to the Total Element of the dimension. In the Dimension Upload wizard, there is a picker to select an element, and when a default total element is set, it will be preselected in the picklist.
NA element Used in cube load with the "Handling of missing elements" option set to createUnderDefault or createUnderDefaultParent mode.
Default read element This default element is used when
  • a dimension is removed while changing cube layout
  • reading an unspecified dimension element with PALO.DATA(...,PALO.EL(...),...)
  • no specific element is selected for the given dimension in a View
  • reading an unspecified #_LANGUAGE element from attribute cube in rules
  • performing a cube extract with an incomplete list of cube output columns
  • a Subset expects elements but no elements are passed (this happens e.g. in nested DynaRanges: if no element is passed from first DR, the second DR will pick the default read element)

Note: Jedox Views that are created after the Default Read Element is defined will be automatically updated. Jedox Views that were created before a Default Read Element is defined will not be influenced by the Default Read Element setting. If you define a Default Read Element on a dimension that previously didn't have one, existing Views will not be updated automatically.

Default write element This default element is used when
  • a dimension is added while changing cube layout
  • writing an unspecified dimension element with PALO.DATA(...,PALO.EL(...),...)
  • no specific element is selected for the given dimension in a View and writeback is executed on a cell in the View
  • calculating a value with an unspecified #_LANGUAGE element in an attribute cube in rules
  • performing a cube load when the load is in an unspecified dimension

If different elements are defined as the default read element, and the default write element respectively, situations can occur where the data which is shown in a spreadsheet cell as the result of a PALO.DATA*() function is different from the cell which would be modified when performing writeback on the same spreadsheet cell. This behavior is intentional, to allow for additional flexibility in creation of the data model. In many scenarios, defining an element as the "default write element" which is itself a child / descendant of the "default read element" is a proper approach, and in these scenarios, the modified value would still indirectly influence the displayed value via the value aggregation.

Default parent element Used in cube loads with the "Handling of missing elements" option set to createUnderDefaultParent.

The default elements are used in the following scenarios:

Cube layout changes

The layout or dimension structure of a cube is flexible and can be changed after the cube has been created, or filled, without losing data (see Changing Cube Layout). Dimensions can be added, removed, or reordered.

When adding or removing dimensions, the OLAP Server has to manipulate existing data in the cube. If a dimension is added, the existing data has to be assigned to an element in the new dimension. Similarly, if a dimension is removed, OLAP has to read existing data from some element in this dimension and maintain the existing data distribution for that element across the other dimensions.

To achieve this balance, new default element settings for dimensions are used. If you add a dimension to a cube, a Default Write Element has to be defined for this dimension. Existing cube data will then be assigned to this element.

If you remove a dimension from a cube, the dimension must have a defined Default Read Element. The values that are read from this element will then be reserved. For example, if you remove a “Months” dimension from a cube in which “Total Year” was defined as the Default Read Element, the cube values that are stored in the OLAP Server will then be those of “Total Year”.

Cube loads

Missing elements can be handled with the options “mapToDefaultWrite” and “mapToDefaultParent”, which use the default elements of the dimension.

Additionally, there is an option, “Cube layout change mode”, which defines the behavior when the source columns and the cube layout don’t match. It allows writing to a default element for missing source columns and the automatic change of the cube layout before the data is loaded.

Flexibility of data formulas

To support flexible cube layouts, formulas that retrieve cube data (mainly the PALO.DATA*() functions) have been enhanced to support changes to the dimension order. When setting a PALO.DATA*() formula, the user can not only specify element names, but also specify the dimension to which a certain element belongs, using the new PALO.EL() expressions. If these expressions are used, the formula is no longer reliant on a specific order of dimensions. Additionally, if a Default Read Element is defined on a dimension, that dimension doesn’t have to be specified at all in the PALO.DATA*() formula, which will read data from the Default Read Element in that case.

Updated November 4, 2024