This is related to my prior topic here https://community.dynatrace.com/t5/DQL/Davis-Analyzer-limits-how-to-chunk-up-the-dimensions/td-p/275485 and I found a similar issue but could not follow its advice here https://community.dynatrace.com/t5/Automations/Workflows-get-data-from-a-previous-dql-task-to-a-new-dql-or/m-p/248656.
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.
A stylized summary response from ‘filter_hosts’ resembles:
[<br> {<br> "types":[{...}],<br> "records:" [<br> {"hostId":"HOST-abc"},<br> ...,<br> {"hostId":"HOST-xyz"}<br> ]<br> },<br> {<br> "types":[{...}],<br> "records:" [<br> {"hostId":"HOST-123"},<br> ...,<br> {"hostId":"HOST-789"}<br> ]<br> }<br>]
In the second task ‘process_hosts’ after filter_hosts Tasks I am trying to setup a Task Input loop that I cannot get working. The Loop input List is defined as:
{% for hostList in result("filter_hosts") %}<br> {{hostList.records}}<br>{% endfor %}
I have a simple DQL that tries to access the loop variable but at runtime I get the error:
Invalid loop items in task 'process_hosts'. The value is not a list.
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.
Any ideas on how to adjust the Input definition? Thanks!