<?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: Coalesce and multivalued fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Coalesce-and-multivalued-fields/m-p/92642#M23922</link>
    <description>&lt;P&gt;I still don't know why coalesce removes the commas that delimit a multivalued field, but running | makemv delim="," fieldname after the coalesce statement puts the commas back.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Oct 2012 18:25:26 GMT</pubDate>
    <dc:creator>responsys_cm</dc:creator>
    <dc:date>2012-10-18T18:25:26Z</dc:date>
    <item>
      <title>Coalesce and multivalued fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Coalesce-and-multivalued-fields/m-p/92641#M23921</link>
      <description>&lt;P&gt;I'm seeing some weird issues with using coalesce in an eval statement with multivalued fields.  Prior to the eval statement, if I export the field to a lookup table, the field's data looks like:&lt;/P&gt;

&lt;P&gt;"1234,&lt;BR /&gt;&lt;BR /&gt;
5678,&lt;BR /&gt;&lt;BR /&gt;
9876,&lt;BR /&gt;&lt;BR /&gt;
3456"&lt;/P&gt;

&lt;P&gt;If I do use coalesce to combine the first non-null value of one of these multivalued fields, the output in the lookup table looks like:&lt;/P&gt;

&lt;P&gt;"39750  &lt;/P&gt;

&lt;P&gt;39751  &lt;/P&gt;

&lt;P&gt;39752  &lt;/P&gt;

&lt;P&gt;39753  &lt;/P&gt;

&lt;P&gt;39754  &lt;/P&gt;

&lt;P&gt;45878",  &lt;/P&gt;

&lt;P&gt;Searches that reference that field in the lookup table come back with an error:  &lt;/P&gt;

&lt;P&gt;Empty csv lookup file (contains only a header) for table 'nessus_plugin_reference_lookup': C:\Program Files\Splunk\etc\apps\ResponsysSecurityConsole\lookups\nessus_plugin_reference_lookup.csv  &lt;/P&gt;

&lt;P&gt;But the lookup table is like 30 MB in size.  If I drop the field created by the coalesce statement, there aren't any problems.&lt;/P&gt;

&lt;P&gt;How can I turn the post-coalesce field back into something that conforms to the normal multi-valued field?  I've tried things like | makemv delim="\n" or | makemv delim="$", but that doesn't break up the data correctly.&lt;/P&gt;

&lt;P&gt;I've also tried using rex after the coalesce statement to match on \d+ with an appropriate max_match=X value, but the field still isn't comma separated within quotes when output to a lookup table.&lt;/P&gt;

&lt;P&gt;Thx.&lt;/P&gt;

&lt;P&gt;Craig&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2012 04:20:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Coalesce-and-multivalued-fields/m-p/92641#M23921</guid>
      <dc:creator>responsys_cm</dc:creator>
      <dc:date>2012-10-17T04:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Coalesce and multivalued fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Coalesce-and-multivalued-fields/m-p/92642#M23922</link>
      <description>&lt;P&gt;I still don't know why coalesce removes the commas that delimit a multivalued field, but running | makemv delim="," fieldname after the coalesce statement puts the commas back.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2012 18:25:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Coalesce-and-multivalued-fields/m-p/92642#M23922</guid>
      <dc:creator>responsys_cm</dc:creator>
      <dc:date>2012-10-18T18:25:26Z</dc:date>
    </item>
  </channel>
</rss>

