<?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 rename the result of replaceString in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238304#M674</link>
    <description>&lt;P&gt;I have this query&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;fetch logs &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| filter matchesValue(host.name, "dar*") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;and matchesPhrase(log.source, "mydomain")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;and matchesPhrase(log.source, "diagnostic")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;and matchesValue(status, "ERROR")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| fieldsAdd replaceString(content, "\n", " ")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| parse replaceString(content, "\n", " "), "LD 'Message=\"' LD:message'\"' LD 'TransactionId' LD"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| fieldsKeep message&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;See the&amp;nbsp;&lt;STRONG&gt;parse replaceString(content, "\n", " ")&lt;/STRONG&gt; part, isn't that bizarre?&lt;/P&gt;&lt;P&gt;The documentation doesn't tell me how to rename the result of replaceString and creates that weird field name. How can I give it a meaningful name to use in the &lt;STRONG&gt;parse&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2024 18:21:18 GMT</pubDate>
    <dc:creator>GerryIsHere</dc:creator>
    <dc:date>2024-02-27T18:21:18Z</dc:date>
    <item>
      <title>rename the result of replaceString</title>
      <link>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238304#M674</link>
      <description>&lt;P&gt;I have this query&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;fetch logs &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| filter matchesValue(host.name, "dar*") &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;and matchesPhrase(log.source, "mydomain")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;and matchesPhrase(log.source, "diagnostic")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;and matchesValue(status, "ERROR")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| fieldsAdd replaceString(content, "\n", " ")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| parse replaceString(content, "\n", " "), "LD 'Message=\"' LD:message'\"' LD 'TransactionId' LD"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| fieldsKeep message&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;See the&amp;nbsp;&lt;STRONG&gt;parse replaceString(content, "\n", " ")&lt;/STRONG&gt; part, isn't that bizarre?&lt;/P&gt;&lt;P&gt;The documentation doesn't tell me how to rename the result of replaceString and creates that weird field name. How can I give it a meaningful name to use in the &lt;STRONG&gt;parse&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 18:21:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238304#M674</guid>
      <dc:creator>GerryIsHere</dc:creator>
      <dc:date>2024-02-27T18:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: rename the result of replaceString</title>
      <link>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238309#M675</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/72301"&gt;@GerryIsHere&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;It's a &lt;A href="https://docs.dynatrace.com/docs/shortlink/dpl-lines-strings#beginning-of-string" target="_self"&gt;lines breaks&lt;/A&gt;.&amp;nbsp;I recommend use&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/dpl-lines-strings#beginning-of-string" target="_self"&gt;replacePattern&lt;/A&gt; and &lt;A href="https://docs.dynatrace.com/docs/shortlink/dpl-dynatrace-pattern-language-hub" target="_self"&gt;DPL&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Miguel_RinconG_0-1709063357934.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17909i81492C5F6E2E7EBF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Miguel_RinconG_0-1709063357934.png" alt="Miguel_RinconG_0-1709063357934.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 19:58:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238309#M675</guid>
      <dc:creator>Miguel_RinconG</dc:creator>
      <dc:date>2024-02-27T19:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: rename the result of replaceString</title>
      <link>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238311#M676</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I need the part at the end, not the part at the beginning. Are you saying use something like LD EOL LD EOL LD:lastline?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 20:10:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238311#M676</guid>
      <dc:creator>GerryIsHere</dc:creator>
      <dc:date>2024-02-27T20:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: rename the result of replaceString</title>
      <link>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238402#M682</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example the &lt;A href="https://docs.dynatrace.com/docs/shortlink/dpl-positional-matchers#end-of-string" target="_self"&gt;EOS&lt;/A&gt; use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;data record(content="_ga_22HX2S1N7P=GS1.1.1702351529.1.0.1702351529.0.0.0\" 3806 1945   ")
| parse content, "LD STRUCTURE{DOUBLE:bytes.re ' ' DOUBLE:bytes.send SPACE}?:struct EOS"
| fieldsAdd struct[bytes.re]
| fieldsAdd struct[bytes.send]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Miguel_RinconG_0-1709127816883.png" style="width: 810px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17935iE2C09FC4D5EEC86B/image-dimensions/810x255?v=v2" width="810" height="255" role="button" title="Miguel_RinconG_0-1709127816883.png" alt="Miguel_RinconG_0-1709127816883.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 13:46:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238402#M682</guid>
      <dc:creator>Miguel_RinconG</dc:creator>
      <dc:date>2024-02-28T13:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: rename the result of replaceString</title>
      <link>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238436#M683</link>
      <description>&lt;P&gt;The solution is to use DATA and not LD, and forget about replaceString&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 19:32:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/rename-the-result-of-replaceString/m-p/238436#M683</guid>
      <dc:creator>GerryIsHere</dc:creator>
      <dc:date>2024-02-28T19:32:46Z</dc:date>
    </item>
  </channel>
</rss>

