<?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 DQL/DPL Transposing Arrays into lines? in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/DQL-DPL-Transposing-Arrays-into-lines/m-p/230638#M693</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I just came across a interesting use case that I'm trying to solve with native DQL/DPL.&lt;/P&gt;&lt;P&gt;Say, I have a bizevent captured content that looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "jobs": [
    {"name": "job1", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
    {"name": "job2", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
    {"name": "job3", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
    {"name": "job4", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So with one bizevent I get the status of a (unknown) list of jobs, which I actually want to treat independently (create metrics from, as individual bizevents, alert, etc....)&lt;/P&gt;&lt;P&gt;I know that DQL is a table pipe/stream processing so the above content would always be "one row" in this stream.&lt;BR /&gt;I'm looking for a creative way how I could extract/action on every list in the "jobs" array.&lt;/P&gt;&lt;P&gt;The only idea I had so far was to create a workflow with a bizevent trigger, that then processes the JSON content and iterates over the array and then ingests a separate bizevent for every item via API (or built in functions if available)?&lt;/P&gt;&lt;P&gt;Do you maybe have more creative ides?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Sat, 02 Dec 2023 14:49:35 GMT</pubDate>
    <dc:creator>r_weber</dc:creator>
    <dc:date>2023-12-02T14:49:35Z</dc:date>
    <item>
      <title>DQL/DPL Transposing Arrays into lines?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/DQL-DPL-Transposing-Arrays-into-lines/m-p/230638#M693</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I just came across a interesting use case that I'm trying to solve with native DQL/DPL.&lt;/P&gt;&lt;P&gt;Say, I have a bizevent captured content that looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "jobs": [
    {"name": "job1", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
    {"name": "job2", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
    {"name": "job3", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
    {"name": "job4", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So with one bizevent I get the status of a (unknown) list of jobs, which I actually want to treat independently (create metrics from, as individual bizevents, alert, etc....)&lt;/P&gt;&lt;P&gt;I know that DQL is a table pipe/stream processing so the above content would always be "one row" in this stream.&lt;BR /&gt;I'm looking for a creative way how I could extract/action on every list in the "jobs" array.&lt;/P&gt;&lt;P&gt;The only idea I had so far was to create a workflow with a bizevent trigger, that then processes the JSON content and iterates over the array and then ingests a separate bizevent for every item via API (or built in functions if available)?&lt;/P&gt;&lt;P&gt;Do you maybe have more creative ides?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 14:49:35 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/DQL-DPL-Transposing-Arrays-into-lines/m-p/230638#M693</guid>
      <dc:creator>r_weber</dc:creator>
      <dc:date>2023-12-02T14:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: DQL/DPL Transposing Arrays into lines?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/DQL-DPL-Transposing-Arrays-into-lines/m-p/230698#M696</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/35901"&gt;@r_weber&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want the jobs in grail to be stored as seperate record, or is it OK just when querying the bizevents to have the result as a list of jobs?&lt;/P&gt;
&lt;P&gt;Because you can easily transform the json into a list of records&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;data record(content="""{
  "jobs": [
    {"name": "job1", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
    {"name": "job2", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
    {"name": "job3", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
    {"name": "job4", "result": "OK", "start": &amp;lt;time&amp;gt;, "end": &amp;lt;time&amp;gt; }
  ]
}""")
| parse content, "JSON(strict=false):json"
|  expand job=json[jobs]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 08:29:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/DQL-DPL-Transposing-Arrays-into-lines/m-p/230698#M696</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-12-04T08:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: DQL/DPL Transposing Arrays into lines?</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/DQL-DPL-Transposing-Arrays-into-lines/m-p/230832#M703</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/38283"&gt;@sinisa_zubic&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;that expand command is golden. Wondering why I didn't stumble across it while reading the documentation.&lt;BR /&gt;I might still want to create individual BizEvents out of one, but for the initial trials this should work!&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Reinhard&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 19:23:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/DQL-DPL-Transposing-Arrays-into-lines/m-p/230832#M703</guid>
      <dc:creator>r_weber</dc:creator>
      <dc:date>2023-12-04T19:23:34Z</dc:date>
    </item>
  </channel>
</rss>

