<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issue getting records from events attribute in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Issue-getting-records-from-events-attribute/m-p/279070#M2185</link>
    <description>&lt;P&gt;suites:{"name":"tests &amp;gt; GetByVINTest","count":13,"passed":10,"failed":3,"skipped":0}, {"name":"tests &amp;gt; SearchEngineTest","count":70,"passed":70,"failed":0,"skipped":0}, {"name":"tests &amp;gt; VinCheckTest","count":11,"passed":11,"failed":0,"skipped":0}&lt;BR /&gt;&lt;BR /&gt;Have this event attribute (suites).&lt;/P&gt;&lt;P&gt;Trying to get the values as a table using the below dql. But I'm only getting the first record in the suites string. Attached screenshot in the post. How could I retrieve all the 3 records?&lt;/P&gt;&lt;P&gt;fetch events&lt;BR /&gt;&amp;nbsp;filter event.kind == "SDLC_EVENT" AND event.category == "test"&lt;BR /&gt;| fields suites, timestamp, suiteCount, environment, group&lt;BR /&gt;| filter isNotNull(suiteCount)&lt;BR /&gt;| filter isNotNull(suites)&lt;BR /&gt;| expand suites&lt;BR /&gt;| parse suites, "JSON:json"&lt;/P&gt;&lt;P&gt;screenshot below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nisah_0-1749611437762.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28415i27D7F4398E331BBC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nisah_0-1749611437762.png" alt="nisah_0-1749611437762.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jun 2025 03:13:57 GMT</pubDate>
    <dc:creator>nisah</dc:creator>
    <dc:date>2025-06-11T03:13:57Z</dc:date>
    <item>
      <title>Issue getting records from events attribute</title>
      <link>https://community.dynatrace.com/t5/DQL/Issue-getting-records-from-events-attribute/m-p/279070#M2185</link>
      <description>&lt;P&gt;suites:{"name":"tests &amp;gt; GetByVINTest","count":13,"passed":10,"failed":3,"skipped":0}, {"name":"tests &amp;gt; SearchEngineTest","count":70,"passed":70,"failed":0,"skipped":0}, {"name":"tests &amp;gt; VinCheckTest","count":11,"passed":11,"failed":0,"skipped":0}&lt;BR /&gt;&lt;BR /&gt;Have this event attribute (suites).&lt;/P&gt;&lt;P&gt;Trying to get the values as a table using the below dql. But I'm only getting the first record in the suites string. Attached screenshot in the post. How could I retrieve all the 3 records?&lt;/P&gt;&lt;P&gt;fetch events&lt;BR /&gt;&amp;nbsp;filter event.kind == "SDLC_EVENT" AND event.category == "test"&lt;BR /&gt;| fields suites, timestamp, suiteCount, environment, group&lt;BR /&gt;| filter isNotNull(suiteCount)&lt;BR /&gt;| filter isNotNull(suites)&lt;BR /&gt;| expand suites&lt;BR /&gt;| parse suites, "JSON:json"&lt;/P&gt;&lt;P&gt;screenshot below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nisah_0-1749611437762.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28415i27D7F4398E331BBC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nisah_0-1749611437762.png" alt="nisah_0-1749611437762.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 03:13:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Issue-getting-records-from-events-attribute/m-p/279070#M2185</guid>
      <dc:creator>nisah</dc:creator>
      <dc:date>2025-06-11T03:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Issue getting records from events attribute</title>
      <link>https://community.dynatrace.com/t5/DQL/Issue-getting-records-from-events-attribute/m-p/279321#M2197</link>
      <description>&lt;P&gt;The issue here is that the JSON parser on its own will not handle multiple JSON objects. There's a JSON_ARRAY parser, but your data doesn't appear to be structured as a JSON array. But not to worry, we can combine the JSON parser with the ARRAY parser to extract all three. We also need to move the expand command down in the query so that it executes AFTER we have a valid array that can be expanded.&lt;/P&gt;&lt;P&gt;The revised DQL would look like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;fetch events
 filter event.kind == "SDLC_EVENT" AND event.category == "test"
| fields suites, timestamp, suiteCount, environment, group
| filter isNotNull(suiteCount)
| filter isNotNull(suites)
| parse suites, "ARRAY{JSON:json ', '?}{1,}:suite"
| expand suite&lt;/LI-CODE&gt;&lt;P&gt;Output in Playground:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="marco_irmer_0-1749767363100.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28468iE21F2FAB177AD660/image-size/medium?v=v2&amp;amp;px=400" role="button" title="marco_irmer_0-1749767363100.png" alt="marco_irmer_0-1749767363100.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2025 22:29:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Issue-getting-records-from-events-attribute/m-p/279321#M2197</guid>
      <dc:creator>marco_irmer</dc:creator>
      <dc:date>2025-06-12T22:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issue getting records from events attribute</title>
      <link>https://community.dynatrace.com/t5/DQL/Issue-getting-records-from-events-attribute/m-p/280192#M2236</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/19769"&gt;@marco_irmer&lt;/a&gt;&amp;nbsp;Thanks for this solution. I had it worked with some splits. But this is much simpler and cleaner code that worked for me. Going to change my code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 18:54:35 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Issue-getting-records-from-events-attribute/m-p/280192#M2236</guid>
      <dc:creator>nisah</dc:creator>
      <dc:date>2025-06-25T18:54:35Z</dc:date>
    </item>
  </channel>
</rss>

