- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 05:36 AM
Hi All,
I am trying to create a database view by joining cmdb_ci_api & cmdb_ci_api_component table
Purpose of this join is to find out which to find parent child relation ship between them.
I created a database view as but I am little bit confuse what where clause I need to use in this case.
Currently I am using in cmdb_ci_api_component -- com.sys_id=api.sys_id
and
cmdb_rel_ci -- rel.parent=api.sys_id
But this not working currently.. kindly assist me in this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2025 04:36 AM
hi @keshav77
No Actual Relationships: You might have cmdb_ci_api and cmdb_ci_api_component records, but no actual relationship records (cmdb_rel_ci) have been created between them.
Incorrect Relationship Type: The most frequent culprit. The type.name you're using ('Used by') does not match the actual relationship type defined in your CMDB for these CIs.
No Data for One of the Tables: If any of the three tables (cmdb_ci_api, cmdb_ci_api_component, cmdb_rel_ci) are empty or lack records that meet the join criteria, the view will be empty.
This helps isolate if the issue is with the relationships themselves.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 05:36 AM
@Ankur Bawiskar any suggestion on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 06:02 AM
@keshav77 , Typically, these tables could have a common field that allows us to join them together.
Regards,
Mohammad Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 06:35 AM
the tables "cmdb_ci_api" & "cmdb_ci_api_component" are just another class and are an extension of cmdb_ci
It's similar to other CI tables which extend cmdb_ci table
What's your exact requirement to join those tables?
You are trying to join parent and child but why?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2025 02:27 AM
@Ankur Bawiskar we are creating a parent child relation between them where api is parent table and api_component is child table. I am trying to create a database view on the basis of there relation ship and try to show the record in that view table.. but some how data is not getting visible if we click on try. I am sharing view screenshot with you