22 May 2025
01:05 PM
- last edited on
23 May 2025
08:25 AM
by
MaciejNeumann
I am current replicating a function in Splunk to use in my Dynatrace queries.
I have replicated the functionality but through the method below:
1. Create a code block segment
2. call the DQL query inside code block using import { queryExecutionClient } from '@dynatrace-sdk/client-query
3. Get the query results modify it using custom JavaScript function
4. Get the results of the segment in raw json format
5. Get the raw JSON result and place it in DQL data json""" <json data>" in DQL, to then chain the subsequent DQL after modifying it>
Does anyone know a better solution to this approach, which reduces overhead work and have it done in one segment block?
Solved! Go to Solution.
22 May 2025 03:23 PM
There are a couple of product ideas already out there and Under Review for creating DQL macros to save and use in later queries: Introduction of a Macro Feature in Dynatrace DQL - Dynatrace Community