About the Model Validator
The Model Validator detects errors as you model the hierarchies and levels of dimensions in a cube.
Dimension hierarchies are validated when:
- You open the canvas for that dimension.
- You edit a dimension hierarchy.
Validation is dependent on the collection of statistics for the underlying table columns. Therefore, hierarchy levels can initially be in an unknown state, but will transition to Good, Error, or Warning once statistics are available.
Hierarchy level states are indicated by flags next to them in the Design Center. The states can be:
- Unknown (black flag)
- Good (green flag)
- Warning (orange flag)
- Error (red flag)
A Validation panel appears at the bottom of the Cube Designer window, and Errors and Warning tabs display the validation results. You can expand and contract the panel using the angle controls at the right. Each error is summarized. You can expand the error message using the angle controls. Click Fix This to display the Level dialog box to correct the problem.
Opening the Hierarchies panel for the dimension shows a flag next to each level indicated the level's status, and the Level dialog box shows the complete error message next to the field with the problem that needs correction:
Note: There may be more than one way to resolve a model validation error. For example, if AtScale identifies a specific hierarchy level as using a duplicate key, the solution preferred by your data architect may be to change the key used in a different hierarchy level.
Model Validation Errors and Examples
Message Applies To Example Child key value points to multiple parent key values Level in a hierarchy A dimension using dim_geo_state
is present. The first level will bestate
with a key and name column ofstate
. The child level will becountry
where the key and name column arecountry
. The child level (united states
) will point to 50 parent states, producing an incorrect result.Level key points to multiple names Level in a hierarchy A geography dimension using dim_geo_state
is present. The one level will have key column ofcountry
and name column ofstate
, producing an incorrect result.Key value points to multiple secondary attributes Key value on secondary attributes A geography dimension using dim_geo_state
is present. The one level will have key column ofcountry
and a name column ofstate
. A secondary attribute is added with a key column ofcountry
and a name column ofstate
producing an incorrect result.Key value points to multiple sort values Sorting on a level in a hierarchy A geography dimension using dim_geo_state
is present. The one level present has a key and name column ofcountry
and a sort column ofstate
, producing an incorrect result.Column's uniqueness flag is incorrect Key and value columns on a level A customer dimension using dim_customer
is present with both the key and value columns set tolastname
. Selecting Contains Unique Names beneath the keys will produce incorrect results because there are duplicate last names.Attribute's Contain Unique Names field is incorrect Level in a hierarchy A customer dimension using dim_customer
is present with both the key and value columns set tolastname
. Enabling Contains Unique Names on the dimension's only level will produce incorrect results.Key can only be used once in this hierarchy Hierarchy in a dimension A date dimension using dim_date
is present with the year and month key columns set toyear
. This produces an incorrect result.
Model Validation Errors and Descriptions
Message | Applies To | Description |
---|---|---|
Child key value points to multiple parent key values | Level in a hierarchy | A child key value cannot point to multiple parent key values. |
Level key points to multiple names | Level in a hierarchy | A hierarchy level's key points to multiple names. |
Key value points to multiple secondary attributes | Key value on secondary attributes | A hierarchy level's key value points to multiple secondary attributes. |
Key value points to multiple sort values | Sorting on a level in a hierarchy | An attribute's key value points to multiple sort values. |
Column's uniqueness flag is incorrect | Key and value columns on a level | The column's uniqueness flag is incorrect. Either there are duplicate key values in the columns, or the uniqueness flag is not selected but could be because no duplicate key values are found. |
Attribute's Contain Unique Names field is incorrect | Level in a hierarchy | The attribute's Contains Unique Names field is incorrect. Either duplicate names are detected for a key, or Contains Unique Names is not selected but could be because no duplicate names are found. |
Key can only be used once in this hierarchy | Hierarchy in a dimension | Two levels in a hierarchy cannot use the same key. |