# DQL Parse msg and extract data to new field

**URL:** <https://community.dynatrace.com/t/dql-parse-msg-and-extract-data-to-new-field/50484>\
**Category:** DQL\
**Tags:** dql, logs\
**Created:** [February 27, 2025, 11:29am UTC](https://community.dynatrace.com/t/dql-parse-msg-and-extract-data-to-new-field/50484 "2025-02-27T11:29:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![almog50](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@almog50](https://community.dynatrace.com/u/almog50)\
**Post date:** [February 27, 2025, 11:29am UTC](https://community.dynatrace.com/t/dql-parse-msg-and-extract-data-to-new-field/50484/1 "2025-02-27T11:29:01Z")

</div>

Hi,&nbsp;  
I have the following msg:

"Starting event processing. Event headers​🔑s2k\_bucketName, value:x-x-stg Key:w2w\_objectUrl, value:processing/operations/2025/02/27/Operation-x-2025-02-24’T’19-20-00-stg.csv Key:s2k\_lineNumber, value:3497 Key:event-id, value:8a37a48f-fbdf-3616-a751-217b3b2276c0 Key:eventId, value:8a37a48f-fbdf-3616-a751-217b3b2276c0 Key:type, value:x-operation-eod Key:eventType, value:x-operation-eod Key:timestamp, value:2025-02-27T10:22:27.688923215Z Key:timeStamp, value:2025-02-27T10:22:27.688928675Z Key:X-dynaTrace, value:��2�� ��~@4�Ũ\<.��2�� �E~o��yO���C�%��ywr��� Key:traceparent, value:00-b3457e6f8699794fb28fac0c43cf25e2-f3797772a0ef1a95-01 Key:tracestate, value:34a1c5a8-a07e0240@dt=fw4;3;fcb932d5;f4;daa;0;0;33c;133b;2h01;3hfcb932d5;4hf4;5h01;6hb3457e6f8699794fb28fac0c43cf25e2;7hf3797772a0ef1a95 Key:x-request-id, value:ae6e7bdb-748a-328a-a5eb-2ff6ecaa9cf0 Key:is-eod, value:true. EventType: x-operation-eod Topic: eod-events (0/54544992) Key: “{ \“ts\”: \“1740651747688\”}” "I want to get&nbsp;Key:s2k\_lineNumber, value:3497 into columns so I can sort by line numbers  
can you please assist ?

---

<div class="post-metadata">

**Author:** ![KeeganNelson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/keegannelson/32/20333_2.png) [@KeeganNelson](https://community.dynatrace.com/u/KeeganNelson)\
**Post date:** [February 27, 2025, 6:21pm UTC](https://community.dynatrace.com/t/dql-parse-msg-and-extract-data-to-new-field/50484/2 "2025-02-27T18:21:08Z")

</div>

Hi almog50,

I was able to parse this log for you and pull the&nbsp;s2k\_lineNumber. Here’s the DQL query that I have created.

 ![KeeganNelson_0-1740679780463.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/f29f6fde7d83249b7eab22b73eee859b7be9a3bc.png)

Here’s a little run down to what the parse is doing.&nbsp;  
1. First, I use LD (Line data) to search through the record until I see&nbsp;_‘s2k\_lineNumber, value:’_&nbsp;  
2. Then I use INT so that the next time it sees an integer then it stores that value in s2k\_lineNumber

The next step would be using the summarize function to sort the new column.

Hope this helps!
