<?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: multivalued OUTPUT field for my automatic lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92290#M23823</link>
    <description>&lt;P&gt;I am having the same issue. Did you get a resolution on this?&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
    <pubDate>Sun, 24 Feb 2013 19:10:44 GMT</pubDate>
    <dc:creator>rdownie</dc:creator>
    <dc:date>2013-02-24T19:10:44Z</dc:date>
    <item>
      <title>multivalued OUTPUT field for my automatic lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92287#M23820</link>
      <description>&lt;P&gt;Is it possible to configure an automatic lookup to use a multivalued OUTPUT field?  I should add that the lookups matching field is multivalued.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2012 15:33:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92287#M23820</guid>
      <dc:creator>carmackd</dc:creator>
      <dc:date>2012-03-14T15:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: multivalued OUTPUT field for my automatic lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92288#M23821</link>
      <description>&lt;P&gt;If you allow multiple matches in your lookup (which is the default) then you can get multi-value outputs. But it has to be set up in the lookup table itself.  Here is an example: mydata.csv contains&lt;/P&gt;

&lt;P&gt;key,resultX,resultY&lt;BR /&gt;&lt;BR /&gt;
1,aaa,bbb&lt;BR /&gt;&lt;BR /&gt;
2,ccc,ddd&lt;BR /&gt;&lt;BR /&gt;
2,ccc,eee  &lt;/P&gt;

&lt;P&gt;Notice that there are two rows with key=2. So if you do a lookup where key is the input field, and where resultX and resultY are output fields, you will get the values&lt;/P&gt;

&lt;P&gt;key=2&lt;BR /&gt;&lt;BR /&gt;
resultX=ccc&lt;BR /&gt;&lt;BR /&gt;
resultY=ddd,eee   (multi-valued)  &lt;/P&gt;

&lt;P&gt;Is this what you are looking for?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2012 21:50:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92288#M23821</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-03-14T21:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: multivalued OUTPUT field for my automatic lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92289#M23822</link>
      <description>&lt;P&gt;Not exactly. My problem is I have a multivalued matching field (key in ex above) and I need to return all matching output, which will also make the output field multivalued. The behavior I'm seeing with the multivalued matching field is that it applies the first multivalued matching field to the lookup and skips the remaining.  &lt;/P&gt;

&lt;P&gt;Example:  I have two keys (key=1 &amp;amp; key=2 example above) in an event that retrieves resultX using an automatic lookup. However the automatic lookup only returns the first match (aaa) when I need it to return (aaa &amp;amp; ccc) in a multivalued output field.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2012 14:02:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92289#M23822</guid>
      <dc:creator>carmackd</dc:creator>
      <dc:date>2012-03-15T14:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: multivalued OUTPUT field for my automatic lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92290#M23823</link>
      <description>&lt;P&gt;I am having the same issue. Did you get a resolution on this?&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Feb 2013 19:10:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92290#M23823</guid>
      <dc:creator>rdownie</dc:creator>
      <dc:date>2013-02-24T19:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: multivalued OUTPUT field for my automatic lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92291#M23824</link>
      <description>&lt;P&gt;If your input key is multivalued, then you &lt;EM&gt;may&lt;/EM&gt; have a problem, depending on what you want to do.&lt;BR /&gt;&lt;BR /&gt;
For this answer, assume that the lookup is described as in lguinn's answer from 14-Mar-2012. And, assume that the event data that we are searching has a format something like this&lt;/P&gt;

&lt;P&gt;14-Feb-2012 09:02:17 12345 1,2 other stuff&lt;/P&gt;

&lt;P&gt;where the fields are the timestamp, a 5-digit field named &lt;CODE&gt;id&lt;/CODE&gt; and a multivalued-field named &lt;CODE&gt;key&lt;/CODE&gt;. Assume that you also have created a lookup named &lt;CODE&gt;lookup_key&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;One easy way to make things work - depending on what you want for a final output -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere | mvexpand key | lookup lookup_key key OUTPUT resultX resultY | whatever else...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Everything else gets more complicated, and depends on exactly what data you have and what result you need.&lt;/P&gt;

&lt;P&gt;So if this idea doesn't work for you, please&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;create a new question&lt;/LI&gt;
&lt;LI&gt;include a few sample events (sanitized of real server names, user names etc)&lt;/LI&gt;
&lt;LI&gt;description of the important fields (and which ones can be multi-valued)&lt;/LI&gt;
&lt;LI&gt;an example of the lookup table (a couple lines should do here)&lt;/LI&gt;
&lt;LI&gt;explanation, mock-up or something to describe the results that you are trying to get&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;There isn't really enough info in this thread to go farther.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2013 13:11:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92291#M23824</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-02-25T13:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: multivalued OUTPUT field for my automatic lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92292#M23825</link>
      <description>&lt;P&gt;I understand what you are trying to do as I'm having the same issue as well. The automatic lookup should execute on each value of the multivalue field in the event and return a multivalue field. Did you happen to find a better solution then editing your events or using mvexpand?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2013 17:26:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92292#M23825</guid>
      <dc:creator>jpass</dc:creator>
      <dc:date>2013-12-06T17:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: multivalued OUTPUT field for my automatic lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92293#M23826</link>
      <description>&lt;P&gt;I am having the same problem... I have a multi-vlued field with 10 events.  When I do a lookup, it only matches on the first event.  Even with an mvexpand on the field (to separate each value of the multi-valued field into separate events), it actually matches on each event of the lookukp value from the first value of the field.  I have events now with the wrong lookup value.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2014 12:56:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92293#M23826</guid>
      <dc:creator>caseypike</dc:creator>
      <dc:date>2014-02-05T12:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: multivalued OUTPUT field for my automatic lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92294#M23827</link>
      <description>&lt;P&gt;If you want to get multi-value outputs then make sure you select "Overwrite field values" for the automatic lookup. In other words, make sure you see &lt;CODE&gt;OUTPUT&lt;/CODE&gt; and not &lt;CODE&gt;OUTPUTNEW&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;By default, the UI sets automatic lookup to use &lt;CODE&gt;OUTPUTNEW&lt;/CODE&gt;, but that will only write to the output field if it does not exist already (which will result in only the first value of an mv-field to being looked up).&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2016 11:14:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multivalued-OUTPUT-field-for-my-automatic-lookup/m-p/92294#M23827</guid>
      <dc:creator>dvb</dc:creator>
      <dc:date>2016-10-26T11:14:35Z</dc:date>
    </item>
  </channel>
</rss>

