<?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: Transfer decimal value into ASCII code in text string. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642461#M222550</link>
    <description>&lt;P&gt;Have you tried my mvmap example? &amp;nbsp;It operates "locally" so to speak, processing one field in one event at a time. &amp;nbsp;mvexpand creates a ton of extra events (rows) that carry everything from the original row, therefore demands a lot more memory.&lt;/P&gt;</description>
    <pubDate>Sat, 06 May 2023 05:26:55 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-05-06T05:26:55Z</dc:date>
    <item>
      <title>How to transfer decimal value into ASCII code in text string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642363#M222515</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a field named as item_description which is an array of decimal value, which represents the description of each item.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I hope to transfer each value in item_description into text string for each item.&lt;/P&gt;
&lt;P&gt;Original data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| makeresults
| eval item_name = "Name_1,Name_2,Name_3,Name_4,Name_5", item_description = "65_66_67,68_69_70,71_72_73,74_75_76,77_78_79"
| makemv delim="," item_name
| makemv delim="," item_description
| eval mv_zipped=mvzip(item_name,item_description)
| mvexpand mv_zipped
| rex field=mv_zipped "(?P&amp;lt;ITEM_NAME&amp;gt;.*),(?P&amp;lt;ITEM_DESP&amp;gt;.*)"
| makemv delim="_" ITEM_DESP
| table _time ITEM_NAME ITEM_DESP&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although the purpose can be fulfilled by the following code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| mvexpand ITEM_DESP
| eval ITEM_DESP_char=printf("%c",ITEM_DESP)
| eventstats list(ITEM_DESP_char) as ITEM_DESP_char by ITEM_NAME
| eval ITEM_DESP_join=mvjoin(ITEM_DESP_char,"")
| dedup ITEM_NAME _time 
| table _time ITEM_NAME ITEM_DESP_join&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;_time&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;ITEM_NAME&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;ITEM_DESP_join&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;XXX&lt;/TD&gt;
&lt;TD height="25px"&gt;&lt;SPAN&gt;Name_1&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD height="25px"&gt;ABC&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;YYY&lt;/TD&gt;
&lt;TD height="25px"&gt;&lt;SPAN&gt;Name_2&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD height="25px"&gt;DEF&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;ZZZ&lt;/TD&gt;
&lt;TD height="25px"&gt;&lt;SPAN&gt;Name_3&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD height="25px"&gt;GHI&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;000&lt;/TD&gt;
&lt;TD height="25px"&gt;&lt;SPAN&gt;Name_4&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD height="25px"&gt;&lt;SPAN&gt;JKL&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;111&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&lt;SPAN&gt;Name_5&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&lt;SPAN&gt;MNO&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;If the item_description becomes very long(ex. lengh=50) and lots of items (ex. 50 items), the &lt;STRONG&gt;mvexpand&lt;/STRONG&gt; command can't work properly with the output message below.&lt;BR /&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;Error message:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;command.mvexpand: output will be truncated at 28200 results due to excessive memory usage. Memory threshold of 500MB as configured in limits.conf / [mvexpand] / max_mem_usage_mb has been reached.&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;Is there any other way to transfer decimal value into ASCII and make the output as a string without using mvexpand command?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 11:06:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642363#M222515</guid>
      <dc:creator>Jouman</dc:creator>
      <dc:date>2023-05-05T11:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer decimal value into ASCII code in text string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642367#M222517</link>
      <description>&lt;P&gt;Do you mean &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvmap.28.26lt.3Bmv.26gt.3B.2C.26lt.3Bexpression.26gt.3B.29" target="_blank" rel="noopener"&gt;mvmap&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval item_name = "Name_1,Name_2,Name_3,Name_4,Name_5", item_description = "65_66_67,68_69_70,71_72_73,74_75_76,77_78_79"
| makemv delim="," item_name
| makemv delim="," item_description
| eval mv_zipped=mvzip(item_name,item_description)
| mvexpand mv_zipped
| rex field=mv_zipped "(?P&amp;lt;ITEM_NAME&amp;gt;.*),(?P&amp;lt;ITEM_DESP&amp;gt;.*)"
| makemv delim="_" ITEM_DESP
| table _time ITEM_NAME ITEM_DESP
| eval ITEM_DESP_char=mvmap(ITEM_DESP, printf("%c",ITEM_DESP))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE width="257px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ITEM_NAME&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;ITEM_DESP&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;ITEM_DESP_char&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="75.96875px"&gt;Name_1&lt;/TD&gt;&lt;TD width="72.6875px"&gt;&lt;DIV class=""&gt;65&lt;/DIV&gt;&lt;DIV class=""&gt;66&lt;/DIV&gt;&lt;DIV class=""&gt;67&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="107.359375px"&gt;&lt;DIV class=""&gt;A&lt;/DIV&gt;&lt;DIV class=""&gt;B&lt;/DIV&gt;&lt;DIV class=""&gt;C&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="75.96875px"&gt;Name_2&lt;/TD&gt;&lt;TD width="72.6875px"&gt;&lt;DIV class=""&gt;68&lt;/DIV&gt;&lt;DIV class=""&gt;69&lt;/DIV&gt;&lt;DIV class=""&gt;70&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="107.359375px"&gt;&lt;DIV class=""&gt;D&lt;/DIV&gt;&lt;DIV class=""&gt;E&lt;/DIV&gt;&lt;DIV class=""&gt;F&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="75.96875px"&gt;Name_3&lt;/TD&gt;&lt;TD width="72.6875px"&gt;&lt;DIV class=""&gt;71&lt;/DIV&gt;&lt;DIV class=""&gt;72&lt;/DIV&gt;&lt;DIV class=""&gt;73&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="107.359375px"&gt;&lt;DIV class=""&gt;G&lt;/DIV&gt;&lt;DIV class=""&gt;H&lt;/DIV&gt;&lt;DIV class=""&gt;I&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="75.96875px"&gt;Name_4&lt;/TD&gt;&lt;TD width="72.6875px"&gt;&lt;DIV class=""&gt;74&lt;/DIV&gt;&lt;DIV class=""&gt;75&lt;/DIV&gt;&lt;DIV class=""&gt;76&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="107.359375px"&gt;&lt;DIV class=""&gt;J&lt;/DIV&gt;&lt;DIV class=""&gt;K&lt;/DIV&gt;&lt;DIV class=""&gt;L&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="75.96875px"&gt;Name_5&lt;/TD&gt;&lt;TD width="72.6875px"&gt;&lt;DIV class=""&gt;77&lt;/DIV&gt;&lt;DIV class=""&gt;78&lt;/DIV&gt;&lt;DIV class=""&gt;79&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="107.359375px"&gt;&lt;DIV class=""&gt;M&lt;/DIV&gt;&lt;DIV class=""&gt;N&lt;/DIV&gt;&lt;DIV class=""&gt;O&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 05 May 2023 08:38:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642367#M222517</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-05-05T08:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer decimal value into ASCII code in text string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642460#M222549</link>
      <description>&lt;P&gt;Hi Yuan,&lt;/P&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;The key issue in my code is, if the items or the item description become very long, there will be warning messages for mvexpand due to too many memory usage.&lt;/P&gt;&lt;P&gt;Is there any other method to avoid using mvexpand while converting decimal values into text array?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 05:10:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642460#M222549</guid>
      <dc:creator>Jouman</dc:creator>
      <dc:date>2023-05-06T05:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer decimal value into ASCII code in text string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642461#M222550</link>
      <description>&lt;P&gt;Have you tried my mvmap example? &amp;nbsp;It operates "locally" so to speak, processing one field in one event at a time. &amp;nbsp;mvexpand creates a ton of extra events (rows) that carry everything from the original row, therefore demands a lot more memory.&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 05:26:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642461#M222550</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-05-06T05:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer decimal value into ASCII code in text string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642479#M222557</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Sorry for misunderstanding your reply at first. I saw mvexpand and I thought mvexpand() is part of the solution.&lt;/P&gt;&lt;P&gt;Thank you to introduce mvmap().&amp;nbsp;&lt;BR /&gt;This command solves the issue indeed.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 19:15:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-transfer-decimal-value-into-ASCII-code-in-text-string/m-p/642479#M222557</guid>
      <dc:creator>Jouman</dc:creator>
      <dc:date>2023-05-06T19:15:57Z</dc:date>
    </item>
  </channel>
</rss>

