Display Principal Class Parent Child CI Relationships in reports using Database View

Rowella Montell
Tera Contributor

Hi!

I'm trying to create a report in which we need to display the Parent and Child CI relationships for Principal Classes only. In this case, I have 2 tables which are cmdb_rel_ci for which displays the Parent and Child CI relationships and the cmdb_class_info table which displays if the class is principal or not (T/F). I have created a new Database View since I'm working with 2 tables however I cannot find any common fields on these 2 tables and thus when the "Left Join" is off no data is displayed. Since dot walking doesn't work in Where Clause I'm not sure what to do anymore. Tried a lot of possible fields to connect these two tables but I'm not getting the correct data I need. 

 

Hoping for your assistance. Thank you!

1 ACCEPTED SOLUTION

JP - Kyndryl
Kilo Sage

Hi Rowella,

Try this:

find_real_file.png

Regards,
JP

View solution in original post

4 REPLIES 4

JP - Kyndryl
Kilo Sage

Hi Rowella,

Try this:

find_real_file.png

Regards,
JP

Rowella Montell
Tera Contributor

Hi @jpplouffe 

Thank you! I think it's displaying the correct data we need. Just a question, if I set some CI as principal class in class manager does it mean that the CI classes under it will also change as principal? Thus when we display the principal child classes it also means that its related parent class are principal classes?

 

Hi @Rowella Montellano 

This I don't know, you will have to test it.

Regards.

JP

Regards,
JP

Community Alums
Not applicable

Hi Rowella,

No unfortunately the Principal Class tick box does nothing to the children class of that parent class.

Regards,

Pete.