<?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 In DQL DPL, what is the best way to separate an endpoint and its target? in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/In-DQL-DPL-what-is-the-best-way-to-separate-an-endpoint-and-its/m-p/274463#M1904</link>
    <description>&lt;P&gt;Hello! Using DQL, I'd like to use the "parse" command to break a string like "/api/abc/abc/abc/123" into "endpoint=/api/abc/abc/abc/", and "target=123". Ideally, I can apply this to any incoming API call.&amp;nbsp;The strings may represent different API calls, so the output I'm looking for is something like the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;"/api/abc/abc/abc/123"&lt;/STRONG&gt; =&amp;gt;&amp;nbsp;&lt;STRONG&gt;"endpoint=/api/abc/abc/abc/{*}"&lt;/STRONG&gt; and &lt;STRONG&gt;"target=123"&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;"/api/abc/123"&lt;/STRONG&gt; =&amp;gt;&amp;nbsp;&lt;STRONG&gt;"endpoint=/api/abc/{*}"&lt;/STRONG&gt; and &lt;STRONG&gt;"target=123"&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;"/api/abc/abc/123/def"&lt;/STRONG&gt; =&amp;gt;&amp;nbsp;&lt;STRONG&gt;"endpoint=/api/abc/abc/{*}/def"&lt;/STRONG&gt; and &lt;STRONG&gt;"target=123"&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'm trying to make the &lt;STRONG&gt;"{*}"&lt;/STRONG&gt; a literal replacement for the data that I take out.&lt;/P&gt;&lt;P&gt;The end goal is to eventually aggregate the occurrences of a specific endpoint even without the target, or interactions with a target even without the endpoint.&lt;/P&gt;&lt;P&gt;Would you have any idea how to do this? I'd really appreciate the help! Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 04 Apr 2025 22:42:23 GMT</pubDate>
    <dc:creator>chloe_bennett</dc:creator>
    <dc:date>2025-04-04T22:42:23Z</dc:date>
    <item>
      <title>In DQL DPL, what is the best way to separate an endpoint and its target?</title>
      <link>https://community.dynatrace.com/t5/DQL/In-DQL-DPL-what-is-the-best-way-to-separate-an-endpoint-and-its/m-p/274463#M1904</link>
      <description>&lt;P&gt;Hello! Using DQL, I'd like to use the "parse" command to break a string like "/api/abc/abc/abc/123" into "endpoint=/api/abc/abc/abc/", and "target=123". Ideally, I can apply this to any incoming API call.&amp;nbsp;The strings may represent different API calls, so the output I'm looking for is something like the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;"/api/abc/abc/abc/123"&lt;/STRONG&gt; =&amp;gt;&amp;nbsp;&lt;STRONG&gt;"endpoint=/api/abc/abc/abc/{*}"&lt;/STRONG&gt; and &lt;STRONG&gt;"target=123"&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;"/api/abc/123"&lt;/STRONG&gt; =&amp;gt;&amp;nbsp;&lt;STRONG&gt;"endpoint=/api/abc/{*}"&lt;/STRONG&gt; and &lt;STRONG&gt;"target=123"&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;"/api/abc/abc/123/def"&lt;/STRONG&gt; =&amp;gt;&amp;nbsp;&lt;STRONG&gt;"endpoint=/api/abc/abc/{*}/def"&lt;/STRONG&gt; and &lt;STRONG&gt;"target=123"&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'm trying to make the &lt;STRONG&gt;"{*}"&lt;/STRONG&gt; a literal replacement for the data that I take out.&lt;/P&gt;&lt;P&gt;The end goal is to eventually aggregate the occurrences of a specific endpoint even without the target, or interactions with a target even without the endpoint.&lt;/P&gt;&lt;P&gt;Would you have any idea how to do this? I'd really appreciate the help! Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 22:42:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/In-DQL-DPL-what-is-the-best-way-to-separate-an-endpoint-and-its/m-p/274463#M1904</guid>
      <dc:creator>chloe_bennett</dc:creator>
      <dc:date>2025-04-04T22:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: In DQL DPL, what is the best way to separate an endpoint and its target?</title>
      <link>https://community.dynatrace.com/t5/DQL/In-DQL-DPL-what-is-the-best-way-to-separate-an-endpoint-and-its/m-p/274475#M1908</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Using DQL, it is feasible to achieve this. I will execute two pipe:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;the first to extract the target&lt;BR /&gt;&lt;EM&gt;NOTE: this is where you need to handle the complexity, but with &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-pattern-language/log-processing-grammar" target="_blank"&gt;DPL&lt;/A&gt; you can manage it well)&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;and then I will generate the endpoint fields using a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/functions/string-functions#replaceString" target="_blank"&gt;replaceString&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;function with the target string.&lt;BR /&gt;&lt;EM&gt;NOTE: If you need more complexity, you could also use a&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/functions/string-functions#replacePattern" target="_blank"&gt;replacePattern&amp;nbsp;&lt;/A&gt;function.&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="markup"&gt;data record(span = "/api/abc/abc/abc/123")
| fieldsAdd parse(span," '/api/abc/abc/abc/' LD:target")
| fieldsAdd endpoint = replaceString(span, target, "{*}" )
| fields target, endpoint&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Apr 2025 16:47:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/In-DQL-DPL-what-is-the-best-way-to-separate-an-endpoint-and-its/m-p/274475#M1908</guid>
      <dc:creator>yanezza</dc:creator>
      <dc:date>2025-04-05T16:47:36Z</dc:date>
    </item>
  </channel>
</rss>

