In this blog entry, we will take the D3 to the next level where I will showcase its implementation in BOM(bill of materials).
what is BOM?
The bill of materials (BOM) is a list of the parts or components that are required to build a product. In simpler terms, it is a hierarchical structure having parent/child relationship where the end item is the final product and intermediate items are its components that are used to build this end product.
What we are implementing?
In this entry, we will try to build parent/child relationship irrespective of the real BOM so as to get the idea what in future we can explore from this relationship.
The example demonstrated is taken from here, but with slight variance, instead using predefined parent/child heirarchy and using table as the view, we will directly implement D3 graph.
Goal is to implement employee/manager hierarchy as shown below:
To create such hierarchy, we follow the steps here:
Step 1:
Create the table in warehouse schema with the following script:
Step 2:
Import the table XW_EMPL_D and create two aliases in physical layer of OBIEE with the name Hier_Employee and Hier Employees Manager as shown in the figure above.
Step 3:
Create the physical join between employee id and manager id of two aliases as shown above.
Step 4:
Pull the tables in BMM layer.
Step 5:
|
Ensure the logical join is created as show above and take care of the type of join i.e. Left Outer as we want all the employees name irrespective of whether they have manager of not.
Step 6:
Drag the two tables in Presentation layer, save the rpd and host it on the server.
Now, create analysis from narrative veiw using employee name from both the tables.Employee name will serve as employee name and manager name from two tables respectively.
Step 7:
Add D3 javascript code in narrative view, which is taken and modified from here, as per our requirements as given below.
Prefix:
Narrative:
Postfix:
The report looks like the one above. One can add other visualizations using this feature.
Hi Mohammad,
Please follow my other page:
http://www.parikshitag.com/2015/01/obiee-visualization-d3j-charts-part-3.html
Hi This is really nice example. Could you please help me to implement Collapsible Tree example in OBIEE.
https://bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd