<?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 Implementing Custom Functions to use in DQL in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Implementing-Custom-Functions-to-use-in-DQL/m-p/277820#M2127</link>
    <description>&lt;P&gt;I am current replicating a function in Splunk to use in my Dynatrace queries.&lt;BR /&gt;&lt;BR /&gt;I have replicated the functionality but through the method below:&lt;BR /&gt;1. Create a code block segment&amp;nbsp;&lt;BR /&gt;2. call the DQL query inside code block using&amp;nbsp;import { queryExecutionClient } from '@dynatrace-sdk/client-query&lt;BR /&gt;3. Get the query results modify it using custom JavaScript function&lt;BR /&gt;4.&amp;nbsp; Get the results of the segment in raw json format&lt;BR /&gt;5. Get the raw JSON result&amp;nbsp; and place it in DQL&amp;nbsp; data json""" &amp;lt;json data&amp;gt;" in DQL, to then chain the subsequent DQL after modifying it&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Does anyone know a better solution to this approach, which reduces overhead work and have it done in one segment block?&lt;/P&gt;</description>
    <pubDate>Fri, 23 May 2025 07:25:19 GMT</pubDate>
    <dc:creator>shapu</dc:creator>
    <dc:date>2025-05-23T07:25:19Z</dc:date>
    <item>
      <title>Implementing Custom Functions to use in DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Implementing-Custom-Functions-to-use-in-DQL/m-p/277820#M2127</link>
      <description>&lt;P&gt;I am current replicating a function in Splunk to use in my Dynatrace queries.&lt;BR /&gt;&lt;BR /&gt;I have replicated the functionality but through the method below:&lt;BR /&gt;1. Create a code block segment&amp;nbsp;&lt;BR /&gt;2. call the DQL query inside code block using&amp;nbsp;import { queryExecutionClient } from '@dynatrace-sdk/client-query&lt;BR /&gt;3. Get the query results modify it using custom JavaScript function&lt;BR /&gt;4.&amp;nbsp; Get the results of the segment in raw json format&lt;BR /&gt;5. Get the raw JSON result&amp;nbsp; and place it in DQL&amp;nbsp; data json""" &amp;lt;json data&amp;gt;" in DQL, to then chain the subsequent DQL after modifying it&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Does anyone know a better solution to this approach, which reduces overhead work and have it done in one segment block?&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 07:25:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Implementing-Custom-Functions-to-use-in-DQL/m-p/277820#M2127</guid>
      <dc:creator>shapu</dc:creator>
      <dc:date>2025-05-23T07:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing Custom Functions to use in DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Implementing-Custom-Functions-to-use-in-DQL/m-p/277837#M2128</link>
      <description>&lt;P&gt;There are a couple of product ideas already out there and Under Review for creating DQL macros to save and use in later queries:&amp;nbsp;&amp;nbsp;&lt;A href="https://community.dynatrace.com/t5/Product-ideas/Introduction-of-a-Macro-Feature-in-Dynatrace-DQL/idi-p/256518" target="_blank"&gt;Introduction of a Macro Feature in Dynatrace DQL - Dynatrace Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 14:23:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Implementing-Custom-Functions-to-use-in-DQL/m-p/277837#M2128</guid>
      <dc:creator>StrangerThing</dc:creator>
      <dc:date>2025-05-22T14:23:48Z</dc:date>
    </item>
  </channel>
</rss>

