<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: cant retrieve id using classEntitySelector in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/cant-retrieve-id-using-classEntitySelector/m-p/262231#M1424</link>
    <description>&lt;P&gt;They also return different record sets. First example returns all host-PGI pairs matching condition (process is JAVA technology) while second example returns only host ID where there was at least one JAVA PGI running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to list all hosts (is and name) and PGIs (like in example 1), but use&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;classicEntitySelector&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;(which is better approach for now, as at it is usually faster), here is the query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.process_group_instance
| filter in (id, classicEntitySelector("type(PROCESS_GROUP_INSTANCE),softwareTechnologies(JAVA)"))
| fieldsAdd dt.entity.host=belongs_to[dt.entity.host]
| fields id=dt.entity.host, entity.name=entityName(dt.entity.host), pgi=id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1731429345735.png" style="width: 851px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24546iE0DCA3453BC12D96/image-dimensions/851x420?v=v2" width="851" height="420" role="button" title="krzysztof_hoja_0-1731429345735.png" alt="krzysztof_hoja_0-1731429345735.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2024 16:36:23 GMT</pubDate>
    <dc:creator>krzysztof_hoja</dc:creator>
    <dc:date>2024-11-12T16:36:23Z</dc:date>
    <item>
      <title>cant retrieve id using classEntitySelector</title>
      <link>https://community.dynatrace.com/t5/DQL/cant-retrieve-id-using-classEntitySelector/m-p/261378#M1393</link>
      <description>&lt;P&gt;In this page of the official documentation :&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/platform/grail/dynatrace-query-language/dql-best-practices#filtering-along-relationships" target="_blank" rel="noopener"&gt;DQL Best practices - Dynatrace Docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The two exemple dont return the same fields, since first one also return the process group instance id. I was wondering how we could retrieve this id in the second exemple, i'm struggling to do it without overcomplicating the query.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 13:01:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/cant-retrieve-id-using-classEntitySelector/m-p/261378#M1393</guid>
      <dc:creator>noe131518</dc:creator>
      <dc:date>2024-11-04T13:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: cant retrieve id using classEntitySelector</title>
      <link>https://community.dynatrace.com/t5/DQL/cant-retrieve-id-using-classEntitySelector/m-p/262231#M1424</link>
      <description>&lt;P&gt;They also return different record sets. First example returns all host-PGI pairs matching condition (process is JAVA technology) while second example returns only host ID where there was at least one JAVA PGI running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to list all hosts (is and name) and PGIs (like in example 1), but use&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;classicEntitySelector&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;(which is better approach for now, as at it is usually faster), here is the query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.process_group_instance
| filter in (id, classicEntitySelector("type(PROCESS_GROUP_INSTANCE),softwareTechnologies(JAVA)"))
| fieldsAdd dt.entity.host=belongs_to[dt.entity.host]
| fields id=dt.entity.host, entity.name=entityName(dt.entity.host), pgi=id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1731429345735.png" style="width: 851px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24546iE0DCA3453BC12D96/image-dimensions/851x420?v=v2" width="851" height="420" role="button" title="krzysztof_hoja_0-1731429345735.png" alt="krzysztof_hoja_0-1731429345735.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 16:36:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/cant-retrieve-id-using-classEntitySelector/m-p/262231#M1424</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2024-11-12T16:36:23Z</dc:date>
    </item>
  </channel>
</rss>

