How to get the list of all the tables extended from base table and their unique columns as well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 01:55 AM
Hi,
For suppose if I have a table A extended from base table cmdb_ci which can be further extensible. Now I extended table B from table A and in the same way table C from table B. Table C is someway related to base table cmdb_ci and it has all the columns of cmdb table. Now I am trying to write a script, which get all the tables somehow related to cmdb_ci. Like in this example, I need to get list like A, B, C even B and C are not direcly extended from cmdb_ci, I want them in list.
And also, I want to get the unique columns list in A, B, C which shouldn't extended from parent table. Could anybody has an idea on achieving this?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 01:57 AM
Hi,
You can get the column list form dictionary table. Not how they are related though, that would be a bit of manual exercise looking at schemas etc.
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 02:04 AM
Hi
Thank you. I have around 100 tables extended from cmdb_ci, and among these some are extensible don't know how many tables got extended from these. So, manually it can't be possible I think.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 02:08 AM
Hmm yea, if you know the tables then you can extract the field list on each of them individually.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 02:00 AM