<?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 Re: How to convert array to String in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/How-to-convert-array-to-String/m-p/283957#M2464</link>
    <description>&lt;P&gt;Ahaaa, I tried asString, but now I see in the documentation that all as... functions just verify the type and return null otherwise. If I want to cast, I need to use the to... functions — in this case toString.&lt;/P&gt;&lt;P&gt;Thanks also for the extra tips on how to set a custom delimiter &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Aug 2025 18:54:41 GMT</pubDate>
    <dc:creator>deni</dc:creator>
    <dc:date>2025-08-17T18:54:41Z</dc:date>
    <item>
      <title>How to convert array to String</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-convert-array-to-String/m-p/283950#M2458</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;From one of the tasks of the DQL course in university:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;H1&gt;Data Types&lt;/H1&gt;&lt;P class=""&gt;Starting with the below DQL Query, what data type are the following fields:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;related_entity_ids&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;dt.davis.is_duplicate&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;event.start&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;Afterwards, modify the query to cast the k8s.container.name field to a String.&lt;/P&gt;&lt;P class=""&gt;I checked the requested types and the type of the k8s.container.name is an array. I tried the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;fetch events
| filter event.kind == "DAVIS_PROBLEM"
| fields k8s.container.name
| filterOut isNull(k8s.container.name)
| fieldsAdd test = asString(k8s.container.name)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value of the test column is null. I searched in the documentation, but didn't find anything like arrayToString(arr, delimiter) or similar.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Deni&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 12:01:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-convert-array-to-String/m-p/283950#M2458</guid>
      <dc:creator>deni</dc:creator>
      <dc:date>2025-08-17T12:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert array to String</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-convert-array-to-String/m-p/283954#M2461</link>
      <description>&lt;P&gt;Unfortunately there is no function where you can specify new delimiter. There is however toString function. This example should explain how it works and how to achieve what you need:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;data record(arr=array("s1","s2","s3"))
| fieldsAdd merged = toString(arr)
| fieldsAdd merged2 = replaceString(merged,"""["""","")
| fieldsAdd merged2 = replaceString(merged2,""""]""","")
| fieldsAdd merged2 = replaceString(merged2,"""", """","/")&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1755453841284.png" style="width: 863px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/29621iBB794F460F4FBAAE/image-dimensions/863x356?v=v2" width="863" height="356" role="button" title="krzysztof_hoja_0-1755453841284.png" alt="krzysztof_hoja_0-1755453841284.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 18:04:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-convert-array-to-String/m-p/283954#M2461</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2025-08-17T18:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert array to String</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-convert-array-to-String/m-p/283957#M2464</link>
      <description>&lt;P&gt;Ahaaa, I tried asString, but now I see in the documentation that all as... functions just verify the type and return null otherwise. If I want to cast, I need to use the to... functions — in this case toString.&lt;/P&gt;&lt;P&gt;Thanks also for the extra tips on how to set a custom delimiter &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 18:54:41 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-convert-array-to-String/m-p/283957#M2464</guid>
      <dc:creator>deni</dc:creator>
      <dc:date>2025-08-17T18:54:41Z</dc:date>
    </item>
  </channel>
</rss>

