18 Apr 2025 02:26 AM
My error is similar to this post that I don't see a resolution for: https://community.dynatrace.com/t5/DQL/DQL-Relationship-Query-returning-too-many-entity-IDs/m-p/2294...
I am running the DQL below which results in error: "The number of entity IDs in the relationship fields has been limited. Please try filtering or narrowing your timeframe."
fetch dt.entity.host
| fieldsAdd tags
| expand tags
| filter contains(tags, "Portfolio:")
| parse tags, """((LD:tag (!<<'\\' ':') LD:value)|LD:tag)"""
| filter value == $Portfolio
| fieldsRemove tags, tag, value
| fieldsAdd disks = contains[dt.entity.disk]
// the error happens for this operation above ^^^^
| expand disks
| fields disks
I tried increasing my Query Limits but no change in the error.
DQL objective:
As soon as I expand disks the error occurs. In my environment for this scenario there are 417 Hosts matching the $Portfolio tag which then expands into at least 9,984 Disks (could be more due to error limits).
Any ideas how to get around this error limit?
Solved! Go to Solution.
18 Apr 2025 01:40 PM
I think the workaround here would be to reverse the logic of the query, where you fetch dt.entity.disk and then use the belongs_to relationship to identify the host, before finally filtering on the portfolio value.
18 Apr 2025 06:49 PM
Thanks Marco. I reversed the DQL sequence and it does sidestep the error. Updated logical sequence is now:
This then allowed me to get to my next stumbling block which I will post about separately. Thanks!