When defining a metadatareader you can add the parent ID in the output by specifying the Parent ID Column Name in the Columns tab. It is not always clear though to which entity this parent ID belongs (and browsing the model graph is often cumbersome).
Is there a way to identify the entity for a given GID value?
Thanks and kind regards,
Albert
Best answer by anna.spakova
Hello @Albert de Ruiter ,
Iβve been talking to engineering, and there is a way how to find out the ancestor type for an entity after all using the graphql query. The _ancestors property holds all the ancestors and the type is what you are looking for.
thank you for this question. Currently, no mechanism would give you the entity type for a specified GID. However, what could maybe help a little, is that when you use the ONE Metadata Writer, on the General tab there is the Parent Type, which lists all the possible parents. In some cases the parent type is only one, in other it can be more types like in this example:
Usually, it lists all the subtypes of possible parent entities, so when you eliminate those, you will get only a handful of options (e.g. databaseLocation is a subtype of location so the parent is simply location and you should be able to insert the GID in the URL: https://<your-environment>/catalog/data/location/<parentId>)
Itβs not much, but it can be used as another way how to get to the information together with the mmd graph.
Anyway, I will pass this on as feedback for our engineering. I had a similar request in the past.
Iβve been talking to engineering, and there is a way how to find out the ancestor type for an entity after all using the graphql query. The _ancestors property holds all the ancestors and the type is what you are looking for.
Hi @anna.spakova, I have done a little testing and it looks certainly usefull. Still two questions:
To narrow down the search I can add a filter like filter: "name = '<CI name value>'". I have also been trying to filter on gid but that doesn't seem to work as it 's not a regular property. Should filtering on gid been done in a different manner, or is that simply not possible?
The node name is catalogItem but in the graphQL it is defined as catalogItems, so in plural. Why is that, maybe because it is named like that in the metadata node?
to filter using GID, you need to use the dollar sign: $id = β<id>β. The plural form here does not affect that, itβs just the syntax of the graphQL saying you want all the CIs. This documentation can also give you more insight into the filtering. The filter is using the AQL query language.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.