28 Sep 2025 05:00 PM
I've already got a K/V DPL that is extracting some data from a field into a JSON object where I will then dynamically parse the data into their own separate fields.
However, before I parse them into their own fields, I'd like to convert the Key names to all lowercase to keep our column naming schema inline with the Dynatrace standard of all lowercase field names.
If I always knew what the key names would be, that would be easy, but I don't. The key names could be anything.
Here's an example JSON object I've created with my parsing rule:
{
"action": "UpdateItem",
"EP": "1",
"ID": "-46",
"AC": "1",
"ClientId": "SomeIDValue",
"ClientRequestId": "SomeRequestIdValue",
"ActID": "SomeActIdValue",
"CorrelationID": "SomeCorrelationIdValue",
"RoutingDataMiss": "SomeRoutingDataValue@somewhere.com"
}
So, in that above example, I'd want the key names (action, EP, ID, AC, ClientId, ClientRequestId, ActID, CorrelationID, and RoutingDataMiss) to all be converted to lowercase.
If DPL had a conversion feature in it (which, man, would that be cool! If we could just define an option to our extract names that could convert the value to all lower/upper case, that would be so great!), I could have converted them as I extracted them using my dynamic DPL JSON parser. But, it doesn't...
I was thinking some dynamic parser that temporarily converted each k/v pair into an array where I could then pass that to a DQL query that only executed the lower( ) function on every other element of the array, starting with the first, but my brain broke when trying to come up with it.
Is there a better way to do this or, is there somebody so good at writing DQL/DPL that something like this would be so easy to them that they'd be willing to help me out with at least an idea of how to go about this?
Thanks so much for any ideas!