<?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 Configure Task Input Loops for Nested Lists Using DQL in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Configure-Task-Input-Loops-for-Nested-Lists-Using-DQL/m-p/276504#M2032</link>
    <description>&lt;P&gt;This is related to my prior topic here&amp;nbsp;&lt;A href="https://community.dynatrace.com/t5/DQL/Davis-Analyzer-limits-how-to-chunk-up-the-dimensions/td-p/275485" target="_blank" rel="noopener"&gt;https://community.dynatrace.com/t5/DQL/Davis-Analyzer-limits-how-to-chunk-up-the-dimensions/td-p/275485&lt;/A&gt;&amp;nbsp;and I found a similar issue but could not follow its advice here&amp;nbsp;&lt;A href="https://community.dynatrace.com/t5/Automations/Workflows-get-data-from-a-previous-dql-task-to-a-new-dql-or/m-p/248656" target="_blank" rel="noopener"&gt;https://community.dynatrace.com/t5/Automations/Workflows-get-data-from-a-previous-dql-task-to-a-new-dql-or/m-p/248656&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a task 'filter_hosts' that is outputting a list of dictionaries containing list of Hosts I want to iterate over in a subsequent task.&lt;/P&gt;
&lt;P&gt;A stylized summary response from 'filter_hosts' resembles:&lt;/P&gt;
&lt;PRE&gt;[&lt;BR /&gt;  {&lt;BR /&gt;    "types":[{...}],&lt;BR /&gt;    "records:" [&lt;BR /&gt;      {"hostId":"HOST-abc"},&lt;BR /&gt;      ...,&lt;BR /&gt;      {"hostId":"HOST-xyz"}&lt;BR /&gt;    ]&lt;BR /&gt;  },&lt;BR /&gt;  {&lt;BR /&gt;    "types":[{...}],&lt;BR /&gt;    "records:" [&lt;BR /&gt;      {"hostId":"HOST-123"},&lt;BR /&gt;      ...,&lt;BR /&gt;      {"hostId":"HOST-789"}&lt;BR /&gt;    ]&lt;BR /&gt;  }&lt;BR /&gt;]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the second task 'process_hosts' after filter_hosts Tasks I am trying to setup a Task Input loop that I cannot get working.&amp;nbsp; The Loop input List is defined as:&lt;/P&gt;
&lt;PRE&gt;{% for hostList in result("filter_hosts") %}&lt;BR /&gt;  {{hostList.records}}&lt;BR /&gt;{% endfor %}&lt;/PRE&gt;
&lt;P&gt;I have a simple DQL that tries to access the loop variable but at runtime I get the error:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Invalid loop items in task 'process_hosts'.&amp;nbsp; The value is not a list.&lt;/PRE&gt;
&lt;P&gt;But I can't get any more runtime log data to help me out. I've played around with variations of the expression for the Loop List but am no closer.&lt;/P&gt;
&lt;P&gt;Any ideas on how to adjust the Input definition?&amp;nbsp; Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Dec 2025 10:49:02 GMT</pubDate>
    <dc:creator>brandon_camp</dc:creator>
    <dc:date>2025-12-18T10:49:02Z</dc:date>
    <item>
      <title>Configure Task Input Loops for Nested Lists Using DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Configure-Task-Input-Loops-for-Nested-Lists-Using-DQL/m-p/276504#M2032</link>
      <description>&lt;P&gt;This is related to my prior topic here&amp;nbsp;&lt;A href="https://community.dynatrace.com/t5/DQL/Davis-Analyzer-limits-how-to-chunk-up-the-dimensions/td-p/275485" target="_blank" rel="noopener"&gt;https://community.dynatrace.com/t5/DQL/Davis-Analyzer-limits-how-to-chunk-up-the-dimensions/td-p/275485&lt;/A&gt;&amp;nbsp;and I found a similar issue but could not follow its advice here&amp;nbsp;&lt;A href="https://community.dynatrace.com/t5/Automations/Workflows-get-data-from-a-previous-dql-task-to-a-new-dql-or/m-p/248656" target="_blank" rel="noopener"&gt;https://community.dynatrace.com/t5/Automations/Workflows-get-data-from-a-previous-dql-task-to-a-new-dql-or/m-p/248656&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a task 'filter_hosts' that is outputting a list of dictionaries containing list of Hosts I want to iterate over in a subsequent task.&lt;/P&gt;
&lt;P&gt;A stylized summary response from 'filter_hosts' resembles:&lt;/P&gt;
&lt;PRE&gt;[&lt;BR /&gt;  {&lt;BR /&gt;    "types":[{...}],&lt;BR /&gt;    "records:" [&lt;BR /&gt;      {"hostId":"HOST-abc"},&lt;BR /&gt;      ...,&lt;BR /&gt;      {"hostId":"HOST-xyz"}&lt;BR /&gt;    ]&lt;BR /&gt;  },&lt;BR /&gt;  {&lt;BR /&gt;    "types":[{...}],&lt;BR /&gt;    "records:" [&lt;BR /&gt;      {"hostId":"HOST-123"},&lt;BR /&gt;      ...,&lt;BR /&gt;      {"hostId":"HOST-789"}&lt;BR /&gt;    ]&lt;BR /&gt;  }&lt;BR /&gt;]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the second task 'process_hosts' after filter_hosts Tasks I am trying to setup a Task Input loop that I cannot get working.&amp;nbsp; The Loop input List is defined as:&lt;/P&gt;
&lt;PRE&gt;{% for hostList in result("filter_hosts") %}&lt;BR /&gt;  {{hostList.records}}&lt;BR /&gt;{% endfor %}&lt;/PRE&gt;
&lt;P&gt;I have a simple DQL that tries to access the loop variable but at runtime I get the error:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Invalid loop items in task 'process_hosts'.&amp;nbsp; The value is not a list.&lt;/PRE&gt;
&lt;P&gt;But I can't get any more runtime log data to help me out. I've played around with variations of the expression for the Loop List but am no closer.&lt;/P&gt;
&lt;P&gt;Any ideas on how to adjust the Input definition?&amp;nbsp; Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 10:49:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Configure-Task-Input-Loops-for-Nested-Lists-Using-DQL/m-p/276504#M2032</guid>
      <dc:creator>brandon_camp</dc:creator>
      <dc:date>2025-12-18T10:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Configure Task Input loop for a list [] nested within a list [] of dictionaries {}</title>
      <link>https://community.dynatrace.com/t5/DQL/Configure-Task-Input-Loops-for-Nested-Lists-Using-DQL/m-p/276702#M2039</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;try this&lt;BR /&gt;{% for hostList in result("filter_hosts.records") %}&lt;BR /&gt;{{hostList.hostId}}&lt;BR /&gt;{% endfor %}&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 20:11:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Configure-Task-Input-Loops-for-Nested-Lists-Using-DQL/m-p/276702#M2039</guid>
      <dc:creator>yanezza</dc:creator>
      <dc:date>2025-05-07T20:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Configure Task Input loop for a list [] nested within a list [] of dictionaries {}</title>
      <link>https://community.dynatrace.com/t5/DQL/Configure-Task-Input-Loops-for-Nested-Lists-Using-DQL/m-p/276765#M2043</link>
      <description>&lt;P&gt;Ok I tried your suggestion but got : "Error evaluating loop expression. 'records' is undefined in the result of task 'filter_hosts'&lt;/P&gt;&lt;P&gt;For normal Task output you're right that .records should be a top-level key in the Dictionary {} response but in this case records is nested within in a containing List [] and repeated several times.&amp;nbsp; Is why I am struggling with this one.&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 13:32:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Configure-Task-Input-Loops-for-Nested-Lists-Using-DQL/m-p/276765#M2043</guid>
      <dc:creator>brandon_camp</dc:creator>
      <dc:date>2025-05-08T13:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Configure Task Input loop for a list [] nested within a list [] of dictionaries {}</title>
      <link>https://community.dynatrace.com/t5/DQL/Configure-Task-Input-Loops-for-Nested-Lists-Using-DQL/m-p/291790#M2927</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/33587"&gt;@brandon_camp&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;SPAN&gt;I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you!&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please let me know what works best for you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 10:48:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Configure-Task-Input-Loops-for-Nested-Lists-Using-DQL/m-p/291790#M2927</guid>
      <dc:creator>IzabelaRokita</dc:creator>
      <dc:date>2025-12-18T10:48:10Z</dc:date>
    </item>
  </channel>
</rss>

