<?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: Lookup command - multiple input fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163736#M46506</link>
    <description>&lt;P&gt;Thank you for this one mate, it helps !&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 14:35:03 GMT</pubDate>
    <dc:creator>pleymort</dc:creator>
    <dc:date>2018-04-19T14:35:03Z</dc:date>
    <item>
      <title>Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163727#M46497</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;is it possible to use more than one input field within a lookup command? &lt;BR /&gt;
The lookuptable looks like this:&lt;/P&gt;

&lt;P&gt;User | Country | FieldA&lt;/P&gt;

&lt;P&gt;I tried it like this, but it didn't work:&lt;/P&gt;

&lt;P&gt;| lookup lookup.csv &lt;STRONG&gt;User, Country&lt;/STRONG&gt; OUTPUT fieldA&lt;/P&gt;

&lt;P&gt;BR&lt;/P&gt;

&lt;P&gt;Heinz&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 10:30:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163727#M46497</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2014-05-14T10:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163728#M46498</link>
      <description>&lt;P&gt;Hi HeinzWaescher,&lt;/P&gt;

&lt;P&gt;see the docs about &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.1/SearchReference/Lookup"&gt;lookup&lt;/A&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Note: The lookup command can accept multiple lookup and local fields and destfields. For example:

lookup &amp;lt;lookup-table-name&amp;gt; &amp;lt;lookup-field1&amp;gt; AS &amp;lt;local-field1&amp;gt;, &amp;lt;lookup-field2&amp;gt; AS &amp;lt;local-field2&amp;gt; OUTPUTNEW &amp;lt;lookup-destfield1&amp;gt; AS &amp;lt;local-destfield1&amp;gt;, &amp;lt;lookup-destfield2&amp;gt; AS &amp;lt;local-destfield2&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the only thing you must be aware of, is that the &lt;CODE&gt;local-field&lt;/CODE&gt; should exists if you use it in a lookup. That would be in your use case &lt;CODE&gt;User and Country&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 10:40:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163728#M46498</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-05-14T10:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163729#M46499</link>
      <description>&lt;P&gt;or are you using &lt;CODE&gt;inputlookup&lt;/CODE&gt; because you are providing a &lt;CODE&gt;lookup.csv&lt;/CODE&gt; in your example?&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 10:50:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163729#M46499</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-05-14T10:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163730#M46500</link>
      <description>&lt;P&gt;Hi MuS,&lt;/P&gt;

&lt;P&gt;I'm not using inputlookup, the table is just called lookup.csv.&lt;/P&gt;

&lt;P&gt;The inputfields are existing in the lookuptable and the event. It is an "and" combination of the inputfields, correct? So the lookup should work and add fieldA for an event, when this combination "User/Country" exists in the lookuptable as well.&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 11:52:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163730#M46500</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2014-05-14T11:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163731#M46501</link>
      <description>&lt;P&gt;let's take this example,&lt;/P&gt;

&lt;P&gt;col1,col2,col3,col4&lt;BR /&gt;
100,300,500,yes&lt;BR /&gt;
200,400,600,no&lt;/P&gt;

&lt;P&gt;Configure this a lookup named &lt;CODE&gt;mylookup&lt;/CODE&gt; and you can use the lookup in a search like this:&lt;/P&gt;

&lt;P&gt;basesearch | lookup mylookup col1 as field1, col2 as field2, col3 as field3 OUTPUT col4&lt;/P&gt;

&lt;P&gt;For each event where all the input values matches, there will be a resulting field, col4, available for that event.&lt;BR /&gt;
So if you have field1=100 AND field2=300 AND field3=500 then you will get back col4=yes&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 12:15:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163731#M46501</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-05-14T12:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163732#M46502</link>
      <description>&lt;P&gt;After some adjustments in my search, it works like expected. Thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 15:31:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163732#M46502</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2014-05-14T15:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163733#M46503</link>
      <description>&lt;P&gt;I wonder if it's possible to do "OR" logic, instead of "AND" logic?&lt;BR /&gt;
Say, if I have field1=100 OR field2=300 OR field3=500 then I will get back col4=yes&lt;/P&gt;</description>
      <pubDate>Sat, 29 Nov 2014 16:57:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163733#M46503</guid>
      <dc:creator>gesman</dc:creator>
      <dc:date>2014-11-29T16:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163734#M46504</link>
      <description>&lt;P&gt;To make an OR you just make multiple lookup with OUTPUTNEW instead of OUTPUT&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my search
| lookup mylookup col1 AS field1 OUTPUTNEW col4
| lookup mylookup col2 AS field1 OUTPUTNEW col4
| lookup mylookup col3 AS field1 OUTPUTNEW col4
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Mar 2017 19:07:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163734#M46504</guid>
      <dc:creator>guarisma</dc:creator>
      <dc:date>2017-03-10T19:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163735#M46505</link>
      <description>&lt;P&gt;Hi MuS,&lt;/P&gt;

&lt;P&gt;What should be the query if we need to perform the search on same local-field?&lt;/P&gt;

&lt;P&gt;lookup &lt;STRONG&gt;lookup-table-name&lt;/STRONG&gt; lookup-field1 AS local-field1, lookup-field2 AS local-field1 &lt;BR /&gt;
OUTPUT lookup-field1, lookup-field2, lookup-field3 &lt;/P&gt;

&lt;P&gt;Here lookup-field3 is corresponding field in lookup table.&lt;BR /&gt;
I have tried the above format, but it says no results found!!&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 19:42:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163735#M46505</guid>
      <dc:creator>srujan9292</dc:creator>
      <dc:date>2017-07-05T19:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163736#M46506</link>
      <description>&lt;P&gt;Thank you for this one mate, it helps !&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 14:35:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163736#M46506</guid>
      <dc:creator>pleymort</dc:creator>
      <dc:date>2018-04-19T14:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup command - multiple input fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163737#M46507</link>
      <description>&lt;P&gt;thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 18:47:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-command-multiple-input-fields/m-p/163737#M46507</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2018-11-20T18:47:01Z</dc:date>
    </item>
  </channel>
</rss>

