# Lookup Entity Relationships in Dynatrace DQL Queries

**URL:** <https://community.dynatrace.com/t/lookup-entity-relationships-in-dynatrace-dql-queries/44351>\
**Category:** DQL\
**Tags:** dql, documentation, notebooks\
**Created:** [February 28, 2024, 9:09pm UTC](https://community.dynatrace.com/t/lookup-entity-relationships-in-dynatrace-dql-queries/44351 "2024-02-28T21:09:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![36Krazyfists](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/36krazyfists/32/37434_2.png) [@36Krazyfists](https://community.dynatrace.com/u/36Krazyfists)\
**Post date:** [February 28, 2024, 9:09pm UTC](https://community.dynatrace.com/t/lookup-entity-relationships-in-dynatrace-dql-queries/44351/1 "2024-02-28T21:09:00Z")

</div>

In the DQL documentation ([here](https://docs.dynatrace.com/docs/platform/grail/querying-monitored-entities#describe-command)), it says that to find all the relationships of an entity, you can just use a command like this:

```markup
describe dt.entity.service_instance
| filter in(data_types, "RELATIONSHIP")

```

And this used to work just a few months ago (I even have a similar query saved in an old Notebook of mine that I would use as a template to quickly look up relationships for entities).&nbsp; But as of at least this week (and who knows how long ago really since I hadn’t tried using it in at least a couple of months), this query no longer works because there is no longer a **data\_types** field called **RELATIONSHIP**.&nbsp; All the fields that used to have a **data\_types** value of **RELATIONSHIP** now have a value of **record**.

Now, good news is that by just swapping **RELATIONSHIP** with **record** in that query does seem to get you all of the relationships for an entity.&nbsp; However, not all of the fields it returns seem to be relationships.&nbsp; For example, if you **describe**  **dt.entity.host**  **record**  **data\_types** , you do get relationship fields like “ **belongs\_to** ”, “ **called\_by** ”, and “ **runs** ”, but you also get fields like “ **logSourceState** ”, “ **logPathLastUpdate** ”, “icon”, and “ **additionalSystemInfo** ” which, unless I’m mistaken, are not relationships.

So, was this a mistake?&nbsp; Do you guys plan to change relationship fields back to have a **data\_types** value of **RELATIONSHIP**?&nbsp; If not, please reconsider, as this made it super easy to find relationships (and&nbsp;_ **only** _&nbsp;relationships) of an entity.&nbsp; However, if this is a permanent change, please update the documentation to whatever is the new best way to list all the relationships of an entity.&nbsp; Hopefully there’s a way to do it other than looking for **record** &nbsp; **data\_types** …

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [January 3, 2025, 3:38pm UTC](https://community.dynatrace.com/t/lookup-entity-relationships-in-dynatrace-dql-queries/44351/2 "2025-01-03T15:38:39Z")

</div>

[@36Krazyfists](https://community.dynatrace.com/user/41155)&nbsp;- in DQL it looks liek they went more specifc to call out the relationship types:

fetch dt.entity.host  
| filter entity.name == “NAME”  
| fieldsAdd calls, called\_by, instance\_of, contains
