HELP: how to build a parent-child hierarchy
Hy everyone,
my question is very basic: i need to know what is the structure of the relational tables that OBIEE accepts upon which i can build a parent-child hierarchy. I have data that OBIEE does not accept, do you know where i can find a clear description of the structure of the tables that has to be builded for creating correctly a parent-child hierarchy?
Thanks anyone a lot,
Regards
I've found what i needed, for everyone else:
http://docs.oracle.com/cd/E21043_01/bi.1111/e10540/dimensions.htm#BGBGACFJ
The parent-child relationship table must include four columns, as follows:
•A column that identifies the member
•A column that identifies an ancestor of the member. Note: The ancestor may be the parent of the member, or a higher-level ancestor.
•A "distance" column that specifies the number of parent-child hierarchical levels from the member to the ancestor
•A "leaf" column that indicates if the member is a leaf member (1=Yes, 0=No)
The column names can be user defined. The data types of the columns must satisfy the following conditions:
•The member and ancestor identifier columns have the same data type as the associated columns in the logical table that contains the hierarchy members. Note that the example shown in Table 9-1 uses text strings for readability, but you normally use integer surrogate keys for member_key and ancestor_key, if they exist in the source dimension table.
•The "distance" and "leaf" columns are INTEGER columns.
Note the following about the rows in a parent-child relationship table:
•Each member must have a row pointing at itself, with distance zero.
•Each member must have a row pointing at each of its ancestors. For a root member, this is a termination row with null for the parent and distance values.
Similar Messages
-
How to update a parent child hierarchy in OBIEE
Hello All
Quick question about updating parent child hierarchy in OBIEE.
As we know, OBIEE 11G allows us to create value based hierarchy by generating table creation script and insert script. In the typical example of employee dimension, the parent child relationship table will be created with the following 4 attributes:
MEMBER_KEY, ANCESTOR_KEY, DISTANCE, IS_LEAF
So, what if later in the years some of the employees got promoted, retired or transferred? The value based hierarchy is going to change because person 1 reports to manager 2 now instead of 1. Obviously, the records in employee dimension is going to be updated. When that happens, how to update the parent child relation table with the same information? Do we have to rerun the insert script? How do we keep the history of employee changes and hierarchy changes?
Please advice
Thank youI guess it will update when the structure changes,Let see the response from other gurus.
Thanks, -
No Results after build a Parent-Child Hierarchy in OBIEE11G
Hi All:
Here's an problem. I followed the "http://sandybi.wordpress.com/2010/08/17/hierarchies-in-obiee-11g-part-1/" this article step by step to create a parent-child hierarchy in admin tool in OBIEE11G.
But after check in and try to retrieve the hierarchy data in Answer. There's always displays "No Results."
Is there any suggestions for this ? Really urgent and thanks for your help.
Best regards
Sunny@Aketi
It is One way that We derive
"sys_connect_by_path(RowIDToChar(RowID),'.') as
RowIDList"
Then
We use Left Join Using
"instr(RowIDList,RowIDToChar(RowID))".sorry, didn't catch what you mean.
my site :-)
http://oraclesqlpuzzle.hp.infoseek.co.jp/4-13.html
pity, I don't know Japanese :(
@Rob
your query is good and simple :) probably it's the best alternative for the OP.
But it won't work with not a plain hierarchy, e.g.:
1
2 3
4
5 6
SQL> create table hierarchy (child,parent)
2 as
3 select 1, null from dual union all
4 select 2, 1 from dual union all
5 select 3, 1 from dual union all
6 select 4, 3 from dual union all
7 select 4, 2 from dual union all
8 select 5, 4 from dual union all
9 select 6, 4 from dual
10 /
Table created
SQL>
SQL> create table data (hierarchyid,value)
2 as
3 select 5, 10 from dual union all
4 select 6, 25 from dual
5 /
Table created
SQL>
SQL> select h.child
2 , sum(connect_by_root d.value)
3 from hierarchy h
4 , data d
5 where h.child = d.hierarchyid (+)
6 connect by prior h.parent = h.child
7 group by h.child
8 order by h.child
9 /
CHILD SUM(CONNECT_BY_ROOTD.VALUE)
1 70
2 35
3 35
4 70
5 10
6 25
6 rows selected
SQL> -
Parent Child Hierarchy Issue in OBIEE 11g
Hi All,
I am in OBIEE 11G v6. I have a sales fact table where the grain is one sale. So I have one row for every sale done.
Now I have a ragged employee hierarchy like this with David at the root node.
David >>Richard>>Sean
David >>James
Also, I have a role dimension which gives me what role each employee has performed on a sale. Only one employee can be associated with one sale. This is the way Roles have been asssigned
David = Manager
Richard = Off1
Sean = Off2
James = Off2
Both Sean and James can have same Roles. Now I have created a parent child hierarchy for my employee dimension and the closure table. Defined the member key, ancestor key relationship in the parent child setting etc.
Now in the report when I pull the parent child hierarchy and the sales_amount in the report, it comes out perfect with all the ragged hierarchy resolved. But the issue comes when I try to limit the report on Role = Off2. It gives me an error saying " The layout of this view combined with the data, selection , drills resulted in no data. Undo drill and view prompt values". Basically what i want is to be able to select any role type and then my hierarchy should be adjusted to show me that data. Like when I select Off2, I want to see David at the Top level and Sean and James under him because they are both Off 2 and David is their manager.
Is that possbile? Also, am I getting this error because when I select Off2 though it gets Sean and James but since David is not Off2, I don't get the data?
I hope I was able to explain the issue, any help on this would be greatly appreciated.
Thanks
RonnySo basically this means that if I build a parent child hierarchy on table A having the stucture like
--David (Manager)
-----James (Off1)
--------Bill (Off2)
and in my sales fact table for let's say today, I have only rows for Bill (Off2) because he is the only officer who did the sales today. Now when I will join my fact table to parent child hierarchy table A I will NOT get any data ? because there is no James who is the parent of Bill. So obiee need to have parent pulled off in the data (ANCESTOR) to be able to roll up the child.(IS_LEAF = 1)
I testes this and if my data only contains only rows for Bill (or I limit on ROLE = Off2) then it won't show the hierarchy. The query which OBIEE fires is to look for either ANCESTOR_KEY = NULL OR (DISTANCE = 1 AND ANCESTOR KEY IN (Bill). Therefore it doesn't I am wondering then what is the use of builiding the parent child hierarchy when we need to pull in all the ancestors (like in this case James for bill and David for james) because in real scenarios there can be cases wherein we would want to filter the data based on other dimensions to which the parent child hierarchy joins ? -
Parent Child Hierarchy in OBIEE 11G
Hi All,
I am working on the parent child hierarchy in OBIEE 11g Source ESSBASE ..followed some of the blogs.
http://www.rittmanmead.com/2010/07/obiee-11gr1-enhancements-to-essbase-support/
I followed the following steps.
1.Imported the Cubes from ESSBASE.
2.Selected Accounts Hirearchy and changed the Hierarchy type to Value.
3.Dragged the subject area to BMM and to Presentation.
4.Now when i checked the Account Hierarchy from in the dashboard its not drilling down.
If i change the Hierarchy type to Unbalanced ...then the Account hiearchy is working fine.
Is there is any settings or process i have to follow..inorder to implement the Value based Hierarchy in OBIEE 11G source ESSBASE.
ThanksSo basically this means that if I build a parent child hierarchy on table A having the stucture like
--David (Manager)
-----James (Off1)
--------Bill (Off2)
and in my sales fact table for let's say today, I have only rows for Bill (Off2) because he is the only officer who did the sales today. Now when I will join my fact table to parent child hierarchy table A I will NOT get any data ? because there is no James who is the parent of Bill. So obiee need to have parent pulled off in the data (ANCESTOR) to be able to roll up the child.(IS_LEAF = 1)
I testes this and if my data only contains only rows for Bill (or I limit on ROLE = Off2) then it won't show the hierarchy. The query which OBIEE fires is to look for either ANCESTOR_KEY = NULL OR (DISTANCE = 1 AND ANCESTOR KEY IN (Bill). Therefore it doesn't I am wondering then what is the use of builiding the parent child hierarchy when we need to pull in all the ancestors (like in this case James for bill and David for james) because in real scenarios there can be cases wherein we would want to filter the data based on other dimensions to which the parent child hierarchy joins ? -
Parent Child Hierarchy (N Level Hierarchy ) in BI 4.0
Hi ,
We have following table structure . We are trying to create parent-child hierarchy and implement drill on the same .
We are using Oracle database as RDBMS.
e.g.
Child Key Parent Key
1
2 1
3 1
4 2
5 2
6 3
7 1
8 5
Now based on this table structure , if we create hierarchy using parent key and child key , we should be able to drill from 1 to {2,3,7} directly.
further when i click on 2 , we should get {4,5 } as resulting rows.
At the same time drill-down should not work on the values which are not parent of anyone (i.e. Leaf Node). e.g. 4, 8, 7, 6.
Can anyone please let me know how can i achieve the same result by building hierarchy or any work around ?
Regards ,
Jeevan ChaudhariDear Gowtham ,
I am very well aware of the level based hierarchy available in BO .
The issue that i have raised is all about the Parent Child Hierarchy which creates the recursive query.
I.e Every Parent has a child and that child can be parent of some other . (See the original example for more illustration) -
Essbase Studio (parent-child hierarchy + attributes)
There is a problem with the parent-child hierarchy and attributes (for example, structural units of the enterprise).
Composition data (source - table in Oracle):
id (ID of the structural unit - a surrogate key, it is PK)
idParent (ID of the parent structural unit)
code (code of the structural unit - the natural key)
name (the name of the structural unit)
type (type of structural unit)
address (address structural unit)
In this case, parent-child relationship is defined fields idParent -> id, all the rest - should serve as attributes for the various disclosures in the reports.
In all the examples that are found in the network, parent-child built without creating attributes, and it really works. But how "to enrich" the attributes of a hierarchy - and sample solutions are not found.
Most requested help: link, advice, examples from life, either by pointing out that "so definitely not!".Dear guru of essbase,
I am quite sure that this problem can still be solved by Essbase Studio.
I can not believe that the Studio developers could not include this feature. It is very important to resolve this issue it is through this component, help please both. Thanks -
Dynamic hierarchy in parent child hierarchy table??
Do you have any experience to handle the requirement of dynamic hierarchy in universe/webi?
We have some data in parent child hierarchy as below u201CCustomeru201D table.
Customer
Parent Child
Z A
Z B
A AA
B BB
AA AAA
For example, Company Z is the parent company of Company A.
Another table, Amount is the amount value of different Customers.
Amount
ID Amt
AA 10
AAA 1
BB 2
Is there any functionality in Universe designer to build related Classes and objects, So that the web intelligence documents represent the following report with the drilling results?
When we want to see the ID and Amt, the expected result should be:
Z 13
when we drill down Z
the result should be:
A 11
B 2
when we drill down A:
the result should be:
AA 11
notes **
the level of hierarchy is dynamic
Any suggestion is appreciated. Thanks.Hi,
The only way to do it is to create recursive derived table that flatten you parent child hierarchy with a given maximum depth.
Here is a sample I built a long time ago to flatten a parent-child hierarchy on Employees table in Foodmart database (SQL Server).
Didier
SELECT DISTINCT
Z.employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
A.supervisor_id_5,
A.employee_id_5,
A.full_name_5,
A.supervisor_id_6,
A.employee_id_6,
A.full_name_6,
Z.supervisor_id AS supervisor_id_7,
Z.employee_id AS employee_id_7,
Z.full_name AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
A.supervisor_id_5,
A.employee_id_5,
A.full_name_5,
Z.supervisor_id AS supervisor_id_6,
Z.employee_id AS employee_id_6,
Z.full_name AS full_name_6
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
Z.supervisor_id AS supervisor_id_5,
Z.employee_id AS employee_id_5,
Z.full_name AS full_name_5
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
Z.supervisor_id AS supervisor_id_4,
Z.employee_id AS employee_id_4,
Z.full_name AS full_name_4
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
Z.supervisor_id AS supervisor_id_3,
Z.employee_id AS employee_id_3,
Z.full_name AS full_name_3
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
WHERE A.employee_id_2 = Z.supervisor_id
) A
WHERE A.employee_id_3 = Z.supervisor_id
) A
WHERE A.employee_id_4 = Z.supervisor_id
) A
WHERE A.employee_id_5 = Z.supervisor_id
) A
WHERE A.employee_id_6 = Z.supervisor_id
UNION
SELECT DISTINCT
A.employee_id_6 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
A.supervisor_id_5,
A.employee_id_5,
A.full_name_5,
A.supervisor_id_6,
A.employee_id_6,
A.full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
A.supervisor_id_5,
A.employee_id_5,
A.full_name_5,
Z.supervisor_id AS supervisor_id_6,
Z.employee_id AS employee_id_6,
Z.full_name AS full_name_6
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
Z.supervisor_id AS supervisor_id_5,
Z.employee_id AS employee_id_5,
Z.full_name AS full_name_5
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
Z.supervisor_id AS supervisor_id_4,
Z.employee_id AS employee_id_4,
Z.full_name AS full_name_4
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
Z.supervisor_id AS supervisor_id_3,
Z.employee_id AS employee_id_3,
Z.full_name AS full_name_3
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
WHERE A.employee_id_2 = Z.supervisor_id
) A
WHERE A.employee_id_3 = Z.supervisor_id
) A
WHERE A.employee_id_4 = Z.supervisor_id
) A
WHERE A.employee_id_5 = Z.supervisor_id
) A
UNION
SELECT DISTINCT
A.employee_id_5 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
A.supervisor_id_5,
A.employee_id_5,
A.full_name_5,
NULL AS supervisor_id_6,
NULL AS employee_id_6,
NULL AS full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
Z.supervisor_id AS supervisor_id_5,
Z.employee_id AS employee_id_5,
Z.full_name AS full_name_5
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
Z.supervisor_id AS supervisor_id_4,
Z.employee_id AS employee_id_4,
Z.full_name AS full_name_4
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
Z.supervisor_id AS supervisor_id_3,
Z.employee_id AS employee_id_3,
Z.full_name AS full_name_3
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
WHERE A.employee_id_2 = Z.supervisor_id
) A
WHERE A.employee_id_3 = Z.supervisor_id
) A
WHERE A.employee_id_4 = Z.supervisor_id
) A
UNION
SELECT DISTINCT
A.employee_id_4 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
NULL AS supervisor_id_5,
NULL AS employee_id_5,
NULL AS full_name_5,
NULL AS supervisor_id_6,
NULL AS employee_id_6,
NULL AS full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
Z.supervisor_id AS supervisor_id_4,
Z.employee_id AS employee_id_4,
Z.full_name AS full_name_4
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
Z.supervisor_id AS supervisor_id_3,
Z.employee_id AS employee_id_3,
Z.full_name AS full_name_3
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
WHERE A.employee_id_2 = Z.supervisor_id
) A
WHERE A.employee_id_3 = Z.supervisor_id
) A
UNION
SELECT DISTINCT
A.employee_id_3 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
NULL AS supervisor_id_4,
NULL AS employee_id_4,
NULL AS full_name_4,
NULL AS supervisor_id_5,
NULL AS employee_id_5,
NULL AS full_name_5,
NULL AS supervisor_id_6,
NULL AS employee_id_6,
NULL AS full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
Z.supervisor_id AS supervisor_id_3,
Z.employee_id AS employee_id_3,
Z.full_name AS full_name_3
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
WHERE A.employee_id_2 = Z.supervisor_id
) A
UNION
SELECT DISTINCT
A.employee_id_2 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
NULL AS supervisor_id_3,
NULL AS employee_id_3,
NULL AS full_name_3,
NULL AS supervisor_id_4,
NULL AS employee_id_4,
NULL AS full_name_4,
NULL AS supervisor_id_5,
NULL AS employee_id_5,
NULL AS full_name_5,
NULL AS supervisor_id_6,
NULL AS employee_id_6,
NULL AS full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
UNION
SELECT DISTINCT
A.employee_id_1 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
NULL AS supervisor_id_2,
NULL AS employee_id_2,
NULL AS full_name_2,
NULL AS supervisor_id_3,
NULL AS employee_id_3,
NULL AS full_name_3,
NULL AS supervisor_id_4,
NULL AS employee_id_4,
NULL AS full_name_4,
NULL AS supervisor_id_5,
NULL AS employee_id_5,
NULL AS full_name_5,
NULL AS supervisor_id_6,
NULL AS employee_id_6,
NULL AS full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A -
Parent child hierarchy and measure using lookup
Hi,
I'm using OBIEE 11.1.1.5 and I have an issue with a parent child hierarchy, which is setup like case 4 in this example . When I create a simple analysis using the hierarchy and a simple measure, it works fine. But when I try to use a calculated measure using a lookup formula, I get the following error:
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46036] Internal Assertion: Condition pTableRef->GetLeftTable() && pTableRef->GetLeftTable()->IsTableReference(), file server/Query/Optimizer/ServiceInterfaceMgr/Src/SQOIDriveJoinGenerator.cpp, line 568. (HY000)
Does anyone know how to get past this error?
Thanks,
MihaiHi,
I'm using OBIEE 11.1.1.5 and I have an issue with a parent child hierarchy, which is setup like case 4 in this example . When I create a simple analysis using the hierarchy and a simple measure, it works fine. But when I try to use a calculated measure using a lookup formula, I get the following error:
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46036] Internal Assertion: Condition pTableRef->GetLeftTable() && pTableRef->GetLeftTable()->IsTableReference(), file server/Query/Optimizer/ServiceInterfaceMgr/Src/SQOIDriveJoinGenerator.cpp, line 568. (HY000)
Does anyone know how to get past this error?
Thanks,
Mihai -
Parent Child Hierarchy for Type 2
I have read the articles on Parent Child hierarchy setup in OBIEE 11g, however, most are based on what seems to be a current snapshot of the Employee-Manager relationship. Has anyone tried to build out a Parent-Child hierarchy/table off a Type 2 dimension. Being able to navigate what the hierarchy may have been on a specific date.
I would welcome any feedback, thanks.Hi,
Thanks for the reply, I'm actually using snapshots. But even with the Type 2 Dim I don't think it will work.
When OBIEE generates the very first sql against the Parent-Child table the fact table is not included in the query. It seems to create 2 queries - one to find the top level parent (ancestor key is null) and then one to find all the leaf nodes.
It does not have any join to the fact table when it does this. So if you have multiple rows in the table (with date stamps) for a single row (person in this case) - it picks up both rows. Therefore, when you have a person who was, say, promoted to manager, and WAS a leaf node, and is now a manager, they show up in the leaf query and don't display in the hierarchy as a manager.
Once it has the leaf nodes and it joins to the fact table everything works (ie the surrogate key join).
I'm trying to figure out if there is any way to influence those initial queries against the parent-child table.
Hopefully that made sense.
Thanks,
Tori -
I am new learner for using OBIEE 11g, when I try to create the Parent_Child_Hierarchy in the repository, BI answer in the web shows the errors:
"State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 38107] *Not all four columns are defined for closure table 'Parent_Chile_Table_Closure'*. (HY000)".
According to the help web "http://www.adivaconsulting.com/adiva-blog/item/22-obiee-11g-hierarchical-table.html", I have created the relational Parent-Child-Hierarchy table in the database that is imported into the physical layer, and finish every steps, but when I drag the hierarchy in the presentation layer into display scope, which shows the errors mentioned above.
If you known the method for solving it,please help me and share your idea, thanks!Hey,
I am also facing the same issue when i try to replicate this practice. (Create Logical Dimensions with Parent Child Hierarchies -- http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11115/biadmin11g_02/biadmin11g.htm#t9s3)
Odbc driver returned an error (SQLExecDirectW).
Error Details
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 22056] To use hierarchical functions, you need to associate a Closure Table with Logical Table Source 'LTS1 Sales Rep'. (HY000)
SQL Issued: SET VARIABLE PREFERRED_CURRENCY='USD';SELECT 0 s_0, "Y - Sample Sales"."Sales Reps"."Sales Rep Name" s_1, CASE WHEN ISLEAF("Y - Sample Sales"."Sales Reps"."H5 Sales Rep DimHier") THEN 1 ELSE 0 END s_2, IDOF("Y - Sample Sales"."Sales Reps"."H5 Sales Rep DimHier") s_3, PARENT("Y - Sample Sales"."Sales Reps"."H5 Sales Rep DimHier") s_4 FROM "Y - Sample Sales" WHERE ISROOT("Y - Sample Sales"."Sales Reps"."H5 Sales Rep DimHier") -
OBIEE 11g Parent Child hierarchy
Hi,
I'm trying to setup a parent-child hierarchy dimension. I have setup a new hierarchy dimension using numeric keys but want to display another field in the hierarchical column on a report e.g. employee fullname & not the member_key based on a numeric value. Can this be done & how do you do it? All the examples I have seen use varchar2 type columns as the keys to do this.
Thanks in advance, Phil
My Setup
=============
Dimension - logical level
===============
member key = employee_id
parent-child table source
===============
member key = employee_id
parent key = supervisor_id
relationship distance = levels_removed
leaf node identifier = isleaf
Employee logical folder
==============
employee_id ( number)- primary key
full_name (varchar2) - unique key
supervisor_id ( number)
Closure table
=========
employee_id ( number)
supervisor_id ( number)
level ( number)
isleaf ( number)Thanks for the link Suresh but the aggregations are working correctly.
My problem is only at the display level. I need to create a dashboard that displays the complete hierarchy.
So for example if I have this hierarchy:
- Steven King
- Adam Frip
Alexis Bull
Anthony Cabrio
Alberto Erraruriz
Den Raphaely
I want the dashboard to display immediately that complete hierarchy. If someone adds a member to the hierarchy in the database, the dashboard should display this new member without having to manually modify the dashboard.
- Steven King
- Adam Frip
Alexis Bull
Anthony Cabrio
- Alberto Erraruriz
Mozhe Atkinson
Den Raphaely
Also, if I just manually open the hierarchy and save the dashboard, if "Steven King" is replaced by "Shanta Vollman", the dashboard doesn't like it and returns a result looking like:
- Adam Frip
Alexis Bull
Anthony Cabrio
- Alberto Erraruriz
Mozhe Atkinson
Den Raphaely
+ Shanta Vollman
So I'm looking for some option that will tell OBIEE to open the hierarchy without having to specify "Drill down on member "Steven King"", "Drill down on member "Adam Frip"...
I hope I'm explaining correctly... -
How to use GL Parent Child relationships in Discoverer?
Subject: How to used GL Parent Child relationships in Discoverer?
How to use GL Parent Child relationships in Discoverer?
Please let me know how to incorporate the parent -child relation ships exsiting in GL Accouting flexfield Segments in Discoverer for drill downs? we have GL - BIS views installed.
How to create the specific Parent -child relationship hierarchies in Discoverer from the FND_* tables?
Please help.
Thanks.
KS.Hi,
I'm also trying to implement this. If you have come any further in solving this any hints would be much appreciated...
regards,
AJ -
Except function with parent child hierarchy using mdx query
HI,
I need to remove some items using mdx query in parent child hierarchy.
I tried with below query,it is not removeing ,could you please help me.
SELECT
{[Measures].[Amount]} ON
COLUMNS
NonEmpty([Account].[Accounts].[Account Level 01],[Measures].[Amount])
ON ROWS
FROM (SELECT
-Descendants({[Account].[Accounts].&[47]},,Leaves)
} ON COLUMNS
FROM [Adventure Works])
induHi Indu,
Why do you remove some itmes using
Descendants function? Generally, we use FILTER function to achieve the requirement.
WITH SET [CustomAccounts] AS
FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name<>'Net Income')
SELECT {[Measures].[Internet Sales Amount]} ON 0
[CustomAccounts] ON 1
FROM [Adventure Works]
WITH SET [CustomAccounts] AS
FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name='Net Income')
SET [RemainingAccount] AS
[Account].[Accounts].[Account Level 01]- [CustomAccounts]
SELECT {[Measures].[Reseller Sales Amount]} ON 0
[RemainingAccount] ON 1
FROM [Adventure Works]
Results.
References.
http://www.databasejournal.com/features/mssql/article.php/3306101/MDX-Essentials-Basic-Set-Functions-The-Filter-Function.htm
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c0149678-97f2-4066-903f-7f9e9ff09b56/filtering-out-dimension-members-with-mdx?forum=sqlanalysisservices
Regards,
Charlie Liao
If you have any feedback on our support,
please click here.
Charlie Liao
TechNet Community Support -
Parent Child Hierarchy - Display other dimension fields against parent
Hi,
I have a Dimension for Customer with a parent child hierarchy. The problem I have is with additional fields within the dimension. See data below:
Row Labels
Customer Group Description
Value
500116 - OOO "Starline"
30
500116 - OOO "Starline"
A - Dealer
5
818781 - OKNO
Direct / End User
10
400464 - OKNO TV
Other
15
500123 - VIDAU SYSTEMS
300
500123 - VIDAU SYSTEMS
A - Dealer
100
400396 - VIDAU SYSTEMS
Other
200
Grand Total
330
I want the Customer Group to show "A - Dealer" for the parent of the first row (against "500116 - OOO "Starline"), but its shown blank. Also, I would like other fields to do the same. As the parent relates to a row in
my dimension table, this should be possible?
Thanks in advance,
DominicHi,
Sorry it took me a while to come back to this.
My dimension has the following columns:
ID
Customer
Customer Group
Parent
1
500116
A - Dealer
NULL
2
818781
Direct / End User
1
2
400464
Other
1
My measure has 3 rows:
customerKey
value
1
5
2
10
3
15
So when this is presented in the cube, the 3 items with values are correctly presented but my problem is that the "Customer Group" doesnt show against record 1 (the parent). In usual circumstances my users will not expand the hierarchy, i
just want the associated row value shown.
Does this make more sense? I hope so, and i hope somebody can help me resolve it.
Thanks,
Dom
Maybe you are looking for
-
Picture files sent from my phone come thru as txt files to my email instead of jpeg. but when I copy to others it goes thru as jpeg fine.
-
How can I get a backup of Contacts from my Nokia L...
I Have a Nokia Lumia 900 and I'm also planning on buying another phone (not nokia), as I have all my contacts on my Nokia Lumia I want to get the all the contacts to my PC for later use. Is there a simple way of doing this Please HELP?
-
How do you find which model iPhone you are using?
Help me find on the iphone what model it is
-
Technical details of temporary failure: TLS Negotiatio...
Hi 2 days ago, I stop getting e-mails from a few domains. One of them was Gmail. Am not sure why, because I have not done anyting to my Exchange 2010. It fully patched, and everything seems okey. Many other external senders can send into us, outlo
-
Can I change where my Lightroom will be used?
I'd like to change Lightroom to be on my desktop instead of my laptop. Can that be done without having to but another Lightroom program or can it be installed on more than one computer?