<?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: StreamingCommand Inappropriately Removes Leading Spaces in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/StreamingCommand-Inappropriately-Removes-Leading-Spaces/m-p/510959#M9130</link>
    <description>&lt;P&gt;I found a solution, but the problem may not be with the SDK. The SDK reads the data passed from the search command, but Splunk strips the data when passed back to Splunk.&lt;/P&gt;&lt;P&gt;The workaround is to modify the SDK 'splunklib.searchcommands' CSV dialect to pass the data back with&amp;nbsp;csv.QUOTE_ALL in internals.py. Although this is not recommended by Splunk, it is likely preferable to modifying other Splunk internals.&lt;/P&gt;</description>
    <pubDate>Sat, 25 Jul 2020 17:03:07 GMT</pubDate>
    <dc:creator>malvidin</dc:creator>
    <dc:date>2020-07-25T17:03:07Z</dc:date>
    <item>
      <title>StreamingCommand Inappropriately Removes Leading Spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/StreamingCommand-Inappropriately-Removes-Leading-Spaces/m-p/510750#M9129</link>
      <description>&lt;P&gt;I can find a way to get results from a&amp;nbsp;StreamingCommand to retain leading spaces. It doesn't matter if the field was fine before the app, it is gone afterward. Or even if the field wasn't processed by the command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval test1 = "  "
| eval test2 = urldecode("%20%20")
| eval ok_here = if(test1==test2 AND len(test1) == 2, "true", "false")
| eval value_for_command = "nothing_special"
| customstreamingcommand field=value_for_command
| eval still_ok_here = if(test1==test2 AND len(test1) == 2, "true", "false")&lt;/LI-CODE&gt;&lt;P&gt;In this simple case, "still_ok_here"&amp;nbsp; is false, but the same test was true before the command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 22:42:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/StreamingCommand-Inappropriately-Removes-Leading-Spaces/m-p/510750#M9129</guid>
      <dc:creator>malvidin</dc:creator>
      <dc:date>2020-07-23T22:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: StreamingCommand Inappropriately Removes Leading Spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/StreamingCommand-Inappropriately-Removes-Leading-Spaces/m-p/510959#M9130</link>
      <description>&lt;P&gt;I found a solution, but the problem may not be with the SDK. The SDK reads the data passed from the search command, but Splunk strips the data when passed back to Splunk.&lt;/P&gt;&lt;P&gt;The workaround is to modify the SDK 'splunklib.searchcommands' CSV dialect to pass the data back with&amp;nbsp;csv.QUOTE_ALL in internals.py. Although this is not recommended by Splunk, it is likely preferable to modifying other Splunk internals.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jul 2020 17:03:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/StreamingCommand-Inappropriately-Removes-Leading-Spaces/m-p/510959#M9130</guid>
      <dc:creator>malvidin</dc:creator>
      <dc:date>2020-07-25T17:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: StreamingCommand Inappropriately Removes Leading Spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/StreamingCommand-Inappropriately-Removes-Leading-Spaces/m-p/511008#M9131</link>
      <description>&lt;P&gt;&lt;SPAN&gt;csv.QUOTE_NONNUMERIC also works, with potentially less overhead that csv.QUOTE_ALL&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jul 2020 10:46:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/StreamingCommand-Inappropriately-Removes-Leading-Spaces/m-p/511008#M9131</guid>
      <dc:creator>malvidin</dc:creator>
      <dc:date>2020-07-26T10:46:50Z</dc:date>
    </item>
  </channel>
</rss>

