<?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 Expanding Multiple arrays in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Expanding-Multiple-arrays/m-p/263241#M1467</link>
    <description>&lt;P&gt;I am trying to expand multiple arrays in 3 separate columns ("Host_Metric", "Start" and "End"). Each array in all 3 columns has 97 elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to expand each of the arrays into records. However, when I used the "expand" command, each array element keeps multiplying with the elements of the other arrays, creating many duplicates with wrong information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I simply want to expand all 3 arrays into their corresponding 97 records with their indexes in the same order. Is this possible?&lt;/P&gt;</description>
    <pubDate>Fri, 22 Nov 2024 10:17:31 GMT</pubDate>
    <dc:creator>Javin_Singh</dc:creator>
    <dc:date>2024-11-22T10:17:31Z</dc:date>
    <item>
      <title>Expanding Multiple arrays</title>
      <link>https://community.dynatrace.com/t5/DQL/Expanding-Multiple-arrays/m-p/263241#M1467</link>
      <description>&lt;P&gt;I am trying to expand multiple arrays in 3 separate columns ("Host_Metric", "Start" and "End"). Each array in all 3 columns has 97 elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to expand each of the arrays into records. However, when I used the "expand" command, each array element keeps multiplying with the elements of the other arrays, creating many duplicates with wrong information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I simply want to expand all 3 arrays into their corresponding 97 records with their indexes in the same order. Is this possible?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2024 10:17:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Expanding-Multiple-arrays/m-p/263241#M1467</guid>
      <dc:creator>Javin_Singh</dc:creator>
      <dc:date>2024-11-22T10:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Expanding Multiple arrays</title>
      <link>https://community.dynatrace.com/t5/DQL/Expanding-Multiple-arrays/m-p/263513#M1471</link>
      <description>&lt;P&gt;Do I understand you correctly that:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. you have three arrays: a = [1,2] , b = [3,4] , c = [5,6]&lt;BR /&gt;2. you expect the output to be:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;a | b | c
---------
1 | 3 | 5
2 | 4 | 6&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;if so, the &lt;A href="https://docs.dynatrace.com/docs/shortlink/dql-operators#iCollectArray" target="_blank"&gt;iCollectArray&lt;/A&gt;&amp;nbsp;function and the following query can help you:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;data record(
  a = array(1,2,3),
  b = array(4,5,6),
  c = array(7,8,9)
)
| fields all = iCollectArray(record(first = a[], second = b[],third = c[]))
| expand all
| fieldsFlatten all&lt;/LI-CODE&gt;
&lt;P&gt;I created a demo for you in the Security investigator in our Playground as well, you can access it at &lt;A href="https://wkf10640.apps.dynatrace.com/ui/apps/dynatrace.security.investigator/share/4c1b0392-60fc-4d21-aebb-0c3dd8ace1f5" target="_blank"&gt;https://wkf10640.apps.dynatrace.com/ui/apps/dynatrace.security.investigator/share/4c1b0392-60fc-4d21-aebb-0c3dd8ace1f5&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Does this solve your problem?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 08:17:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Expanding-Multiple-arrays/m-p/263513#M1471</guid>
      <dc:creator>Tiit_Hallas</dc:creator>
      <dc:date>2024-11-25T08:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Expanding Multiple arrays</title>
      <link>https://community.dynatrace.com/t5/DQL/Expanding-Multiple-arrays/m-p/263523#M1472</link>
      <description>&lt;P&gt;Thank you. This solved my problem.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 08:39:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Expanding-Multiple-arrays/m-p/263523#M1472</guid>
      <dc:creator>Javin_Singh</dc:creator>
      <dc:date>2024-11-25T08:39:19Z</dc:date>
    </item>
  </channel>
</rss>

