Adding Custom table in CMDB Query Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 12:27 AM
Hi,
Is there any was we can add the Custom table to be shown in CMDB Query Builder?
I have read some where in the communities that if the Custom table is referenced/extends from the CI table then only it will show in CMDB Query Builder.
Any thoughts/suggestions on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 12:53 AM
Hi @Suman21
Yes, you can add a custom table to be shown in the CMDB Query Builder in ServiceNow, but there are specific requirements for it to appear as an available class in the builder:
1. Table Must Extend a CI Class
-
For a custom table to appear as a selectable node in the CMDB Query Builder, it must extend from a Configuration Item (CI) class—typically, this means it should extend from
cmdb_ci
or one of its child classes. -
This is because the CMDB Query Builder is designed to work with the CMDB hierarchy, which is built on tables extending from
cmdb_ci
. If your custom table is not a child ofcmdb_ci
, it will not be available as a starting point or node in the Query Builder
2. Reference Relationships
-
If your custom table is not a direct extension of a CI class but references a CI class (for example, through a reference field pointing to
cmdb_ci
), you may be able to include it in queries, but not as a primary node. Instead, you can build queries that start from a CI class and then reference your custom table through relationships or reference fields. -
The Query Builder includes tables that have a reference back to a CI class table, not tables that CI classes reference. So, if your table only references a CI class, it may not appear as a selectable node, but you can dot-walk to its data from the CI class.
Hope that helps
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 01:11 AM
In order for a table to appear in CMDB Query Builder it needs to be an extension of Configuration Item (cmdb_ci).
Is your custom table an extension of cmdb_ci?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 01:37 AM
No, it is not a extension from cmdb_ci table.
That is the reason why I have posted my query in the community to check if there is any other solution to bring custom table to cmdb query builder if it is not extension from cmdb_ci table.
But seems it is not possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 02:10 AM