# Parsing a log file with DQL

**URL:** <https://community.dynatrace.com/t/parsing-a-log-file-with-dql/42317>\
**Category:** DQL\
**Tags:** dql, logs\
**Created:** [October 26, 2023, 4:10pm UTC](https://community.dynatrace.com/t/parsing-a-log-file-with-dql/42317 "2023-10-26T16:10:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raul\_CL](https://avatars.discourse-cdn.com/v4/letter/r/7feea3/32.png) [@Raul\_CL](https://community.dynatrace.com/u/Raul_CL)\
**Post date:** [October 26, 2023, 4:10pm UTC](https://community.dynatrace.com/t/parsing-a-log-file-with-dql/42317/1 "2023-10-26T16:10:38Z")

</div>

Hi everyone  
I’m new to working with Dynatrace and new in this community.  
I’m writing you because I’m trying to parse out attributes in a log with DQL (Grail), but I’m having a problem getting a clean value.  
My log has (among other info) the next text:

**2023-10-25 12:02:35.661320 “MT8”=“1314” “OMT”=“1304” “RACQ\_ID”=“00100”**

I want to parse it creating columns with MT8, OMT and RACQ\_ID, however, I’m getting the value with "="1314. I just wish to get 1314, without quotes and the equal symbol.

I was wondering if you could tell me if there is a way to do that.  
I’m using:

|fetch logs  
| filter matchesValue(host.name, “node1” )  
| filter matchesValue(log.source, “/app01/ssk/output.log”)  
| sort timestamp desc  
| parse content, “LD ‘MT8’, LD:MT ‘OMT’, LD:OMT ‘RACQ\_ID’ LD:RACQ\_ID”  
| fields timestamp , MT8 , OMT , RACQ\_ID

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [October 26, 2023, 6:28pm UTC](https://community.dynatrace.com/t/parsing-a-log-file-with-dql/42317/2 "2023-10-26T18:28:05Z")

</div>

Try this out:

|parse content, “LDF:Text '\“MT8\”=\”', LD:MT8 ‘\" \“OMT\”=\"’, LD:OMT ‘\" \“RACQ\_ID\”=\"’, LD:RACQ\_ID ‘\"’"

Let us know if worked.

---

<div class="post-metadata">

**Author:** ![Raul\_CL](https://avatars.discourse-cdn.com/v4/letter/r/7feea3/32.png) [@Raul\_CL](https://community.dynatrace.com/u/Raul_CL)\
**Post date:** [October 26, 2023, 7:28pm UTC](https://community.dynatrace.com/t/parsing-a-log-file-with-dql/42317/3 "2023-10-26T19:28:27Z")

</div>

Hi Dannemca  
It worked. I just changed LDF:Text by LD only and now I get just the value.  
|parse content, “LD '\“MT8\”=\”', LD:MT8 ‘\" \“OMT\”=\"’, LD:OMT ‘\" \“RACQ\_ID\”=\"’, LD:RACQ\_ID ‘\"’"

Thank you very much
