# DQL Parse command

**URL:** <https://community.dynatrace.com/t/dql-parse-command/51269>\
**Category:** DQL\
**Tags:** dql, dpl, logs\
**Created:** [April 17, 2025, 4:15am UTC](https://community.dynatrace.com/t/dql-parse-command/51269 "2025-04-17T04:15:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sisapy09](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@Sisapy09](https://community.dynatrace.com/u/Sisapy09)\
**Post date:** [April 17, 2025, 4:15am UTC](https://community.dynatrace.com/t/dql-parse-command/51269/1 "2025-04-17T04:15:31Z")

</div>

just practicing the DQL commands, can someone help me fix this parse command. it is from demo env. and if anyone have better document to understand the DQL with example. please share with me.

fetch logs  
| filter matchesValue(loglevel, “Error”)  
| filter contains(content, “Failed to export to Stackdriver”)  
| fields content  
| parse content, “”“TIMESTAMP:time LD:Error ‘:’ LD:type ‘:’ LD:code LD:desc”“”

 ![Sisapy09_0-1744863193314.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/8/c8120ee1f0181ec7eb0cd817a62a60000b746dc4.png)

---

<div class="post-metadata">

**Author:** ![Sisapy09](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@Sisapy09](https://community.dynatrace.com/u/Sisapy09)\
**Post date:** [April 17, 2025, 5:31am UTC](https://community.dynatrace.com/t/dql-parse-command/51269/2 "2025-04-17T05:31:23Z")

</div>

i tried this, able to extract fields but is there any better way to do it.

content:&nbsp;“2025/04/17 05:26:21 Failed to export to Stackdriver: rpc error: code = PermissionDenied desc = The caller does not have permission”

 ![Sisapy09_0-1744867824398.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/e126d5dc3b1b692c31c43f0aaff2b580050cd8e9.png)

---

<div class="post-metadata">

**Author:** ![marco\_irmer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marco_irmer/32/3038_2.png) [@marco\_irmer](https://community.dynatrace.com/u/marco_irmer)\
**Post date:** [April 18, 2025, 10:23pm UTC](https://community.dynatrace.com/t/dql-parse-command/51269/3 "2025-04-18T22:23:42Z")

</div>

My guess is that the [TIMESTAMP](https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-pattern-language/log-processing-time-date#timestamp-time) matcher you are using needs to be modified with the format modifier in order to successfully extract the timestamp.

The DQL will then have the pattern defined in the format & position as shown in the example below:

```javascript
| parse content, """TIMESTAMP('<pattern goes here>'):time LD:Error ':' LD:type ':' LD:code LD:desc"""

```

---

<div class="post-metadata">

**Author:** ![Sisapy09](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@Sisapy09](https://community.dynatrace.com/u/Sisapy09)\
**Post date:** [April 21, 2025, 9:56am UTC](https://community.dynatrace.com/t/dql-parse-command/51269/4 "2025-04-21T09:56:06Z")

</div>

[@marco\_irmer](https://community.dynatrace.com/user/19769)&nbsp;it is not working, below is the content. try it if you can get the fields in easy format.

“2025/04/21 09:39:20 Failed to export to Stackdriver: rpc error: code = PermissionDenied desc = The caller does not have permission”

---

<div class="post-metadata">

**Author:** ![StrangerThing](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/strangerthing/32/12182_2.png) [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Post date:** [April 21, 2025, 2:00pm UTC](https://community.dynatrace.com/t/dql-parse-command/51269/5 "2025-04-21T14:00:05Z")

</div>

data record(content=“2025/04/21 09:39:20 Failed to export to Stackdriver: rpc error: code = PermissionDenied desc = The caller does not have permission”)  
| parse content, “”“TIMESTAMP(‘YYYY/MM/DD HH:mm:ss’):time LD:Error ‘:’ LD:type ‘:’ SPACE 'code = ’ LD:code SPACE 'desc = 'LD:desc”“”
