If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Parent child dimensions in Dynamic Cubes

Started by Vishnu Priya, 04 Nov 2019 04:38:58 AM

Previous topic - Next topic

Vishnu Priya

Hi,

I am new to Cognos Cube Designer and trying to define a Parent Child Dimension in a model. While trying to start the cube I am getting an error: XQE-ROL-0181 Network hierarchies are not supported. The member 'XYZ' found at database row 10 in hierarchy 'Sample_Hierarchy' has more than one parent.

Not sure how to resolve this error and followed the IBM documentation for creating this sample. Please suggest a solution in resolving this issue

bus_pass_man

Have you read the message?  Do you understand it?  If not, what parts did you you not understand and what parts did you understand?   What documentation did you use? 

Each member key in a parent-child dimension needs to use unique keys for the parent and child keys.   

The error is saying that the key value that you used for a member has more than one parent key.  This is most commonly the case when the dimension has data which corresponds to slow change.

You need to know your data and to be able to recognize the appropriate modelling patterns, one of which is the concept of slowly changing dimensions.  This is true regardless of whether you are using a Cognos product or not.

If you look at the Cognos warehouse sample data base, you will see that the employee dim table has many records where the employee is the same person.  These people have changed managers or changed roles in the Cognos warehouse ficton.

Here is the dynamic cube redbook.  There's a small section on parent child dimensions. (5.3.3) and another one on slow change (6.3).

http://www.redbooks.ibm.com/redbooks/pdfs/sg248064.pdf



Luckily I have the first edition of the PDF too.   There's a section that isn't in the second edition, which I have pasted below.


4.6.2 Metadata discovery
Be aware of the nature of your dimension and whether it is or will be a slowly changing
dimension.
In the Cognos sample database GOSLDW, the table EMP_EMPLOYEE_DIM is structured so
that we can explore both the concept of the differences between parent-child hierarchies and
regular hierarchies and the concept of slowly changing dimensions.
Examine the EMP_EMPLOYEE_DIM table in GOSLDW. It is clear that MANAGER_CODE
and EMPLOYEE_CODE, which are the natural keys that identify these entities in the
dimension, are normally sufficient to be respectively the parent and child keys of this
dimension if you are modeling it as a parent-child dimension. Because of changes, however,
new records that document the changes are made and those keys no longer are adequate to
identify members.
Use the following steps:
1. Select the table EMP_EMPLOYEE_DIM in the data source explorer.
2. Right-click View data. The Tabular data tab opens. The first 30 records of the table are
displayed. If you want to see more data, click either the Next page or Bottom button.
3. Right-click the Tabular data tab and select Pin. Pinning causes the tab to remain open
until you close it.
4. Examine several of the records. The EMPLOYEE_NAME column is near the end of the
columns in the table so you must scroll over to it. The employee named Björn Winkler has
two records.
Examine the EMPLOYEE_KEY, EMPLOYEE_CODE, MANAGER_CODE, and
MANAGER_KEY column values for the two records from Björn.
As you examine the records, you see that Björn changed managers, as Table 4-1 shows.
Table 4-1 Employee values

EMPLOYEE_CODE EMPLOYEE_KEY MANAGER             MANAGER_CODE MANAGER_KEY
10016                4006               Gretchen Goetschy    10701                 4403
10016                 4007              Fritz Hirsch               10017                4161


Other records in this data source document employees who change workplaces (Antoine
Dubois; his natural key is 10680). Enrico Marino, who is located in the member path of
Maximilian Saltzman/Bernard Simon/Nicolas Bichot/Tresa Seefelder, gets a promotion.
Daniel Hart and Isaac Brule become managers and acquire subordinates.
4.6.3 Slowly changing dimension as a parent-child dimension
To model a slowly changing dimension in a parent-child dimension, both the parent and child
need surrogate keys to uniquely identify the member. A member can have multiple parents so
a surrogate key must exist: not only for the key that defines the member, but for its position in
the hierarchy. Without that information, the hierarchy attempts to form as a network hierarchy
and thus fail.

Chapter 4. Modeling dynamic cubes 81
Creating a slowly changing dimension as a parent-child dimension
Complete the following steps:
1. Select the gosldw_sales cube.
2. Right-click create parent-child dimension.
3. Expand EMP_EMPLOYEE_DIM in the Data Source Explorer tree.
4. Drag EMPLOYEE_NAME, EMPLOYEE_KEY, EMPLOYEE_CODE, MANAGER_CODE,
and MANAGER_KEY into the dimension.
5. Set EMPLOYEE_NAME as the member caption.
6. Set MANAGER_KEY as the parent.
7. Set EMPLOYEE_KEY as the child.
8. Set the relationship between the dimension and the measure dimension to use
EMPLOYEE_KEY for the dimension and EMPLOYEE_KEY for the measure dimension.
9. Publish the cube.
10.Expand the member tree for the dimension in Report Studio.