<?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: Using two seperate inputlookups in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368646#M163075</link>
    <description>&lt;P&gt;Thanks! &lt;BR /&gt;
The problem has been solved now but your method works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2018 16:38:41 GMT</pubDate>
    <dc:creator>samwatson45</dc:creator>
    <dc:date>2018-02-07T16:38:41Z</dc:date>
    <item>
      <title>Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368638#M163067</link>
      <description>&lt;P&gt;I have two files which I have uploaded into Splunk, and both work as intended. &lt;BR /&gt;
One is a detailed file containing peoples names, along with other information. &lt;BR /&gt;
The second is a specific list of names of people I am interested in looking at from the first file.&lt;/P&gt;

&lt;P&gt;I know I can import files into my searches with&lt;BR /&gt;
     | inputlookup  file.csv | &lt;EM&gt;The rest of the search&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;But when I try to input two lookups I get an error. &lt;BR /&gt;
What is the easiest way to do this?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 14:20:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368638#M163067</guid>
      <dc:creator>samwatson45</dc:creator>
      <dc:date>2018-02-07T14:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368639#M163068</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup file.csv|join &amp;lt;common fieldname i.e. people name&amp;gt; [|inputlookup file2.csv]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;here join with second lookup using common fieldname as in your case it is people_name field&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 14:24:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368639#M163068</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-07T14:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368640#M163069</link>
      <description>&lt;P&gt;Maybe I should have been more clear, this simply added on the second file to the first. &lt;/P&gt;

&lt;P&gt;The first file is one I want to do the searching on, the second file contains a list of people I want to be searching again. Essentially it is an easier way rather than writing (person=A OR person=B....) in every search and also means it can easily be updated. &lt;BR /&gt;
So I essentially want to query the second file against the first.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 14:31:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368640#M163069</guid>
      <dc:creator>samwatson45</dc:creator>
      <dc:date>2018-02-07T14:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368641#M163070</link>
      <description>&lt;P&gt;join will not append/add two files instead it will match using common fields .&lt;BR /&gt;
for ex.&lt;BR /&gt;
file1.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;people_name        column2
A                         2
B                         3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;file2.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;people_name                   column3
A                           25
B                           88
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and now join will give output as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;people_name  column2                 column3
A                  2                   25
B                  3                   88
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2018 15:26:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368641#M163070</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-07T15:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368642#M163071</link>
      <description>&lt;P&gt;Mine came out in the format&lt;/P&gt;

&lt;P&gt;file1.csv&lt;/P&gt;

&lt;P&gt;people_name        column2&lt;BR /&gt;
 A                         2&lt;BR /&gt;
 B                         3&lt;/P&gt;

&lt;P&gt;file2.csv&lt;/P&gt;

&lt;P&gt;people_name&lt;BR /&gt;&lt;BR /&gt;
 A&lt;BR /&gt;&lt;BR /&gt;
 B                           &lt;/P&gt;

&lt;P&gt;output&lt;/P&gt;

&lt;P&gt;people_name   people_name  column2&lt;BR /&gt;&lt;BR /&gt;
A                         A                  2&lt;BR /&gt;&lt;BR /&gt;
A                         B                  3                   &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:01:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368642#M163071</guid>
      <dc:creator>samwatson45</dc:creator>
      <dc:date>2020-09-29T18:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368643#M163072</link>
      <description>&lt;P&gt;could you provide what query you have tried?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 16:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368643#M163072</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-07T16:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368644#M163073</link>
      <description>&lt;P&gt;Based on what  you've said in comments above, I believe this is the search structure you're looking for. I'll reference the file containing the logs you want to search as &lt;CODE&gt;events_log.csv&lt;/CODE&gt; and the file containing the list of people as &lt;CODE&gt;people.csv&lt;/CODE&gt;. This also assumes you have a column in &lt;CODE&gt;people.csv&lt;/CODE&gt; called &lt;CODE&gt;people_name&lt;/CODE&gt;, and that the logs in &lt;CODE&gt;events_log.csv&lt;/CODE&gt; also contain a field called &lt;CODE&gt;people_name&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup events_log.csv where
 [ | inputlookup people.csv 
   | fields people_name ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the &lt;CODE&gt;events_log.csv&lt;/CODE&gt; file names the field differently, then you'll need to a &lt;CODE&gt;rename&lt;/CODE&gt; command inside the subsearch to make the field names align.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 16:20:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368644#M163073</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-07T16:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368645#M163074</link>
      <description>&lt;P&gt;Ah, I now see that I had the  part of the search string entered wrongly, my mistake. &lt;BR /&gt;
This method works great, thanks for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 16:37:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368645#M163074</guid>
      <dc:creator>samwatson45</dc:creator>
      <dc:date>2018-02-07T16:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368646#M163075</link>
      <description>&lt;P&gt;Thanks! &lt;BR /&gt;
The problem has been solved now but your method works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 16:38:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368646#M163075</guid>
      <dc:creator>samwatson45</dc:creator>
      <dc:date>2018-02-07T16:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368647#M163076</link>
      <description>&lt;P&gt;Great. As an FYI, you should not use a &lt;CODE&gt;join&lt;/CODE&gt; for searches like this if you can possibly avoid it. As data sizes grow, &lt;CODE&gt;join&lt;/CODE&gt; will consume a lot of resources and will often have silent failures that will be a pain to diagnose. There will likely be times you can't avoid using a &lt;CODE&gt;join&lt;/CODE&gt; in your search, but it's strongly recommended that you avoid them when possible.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 16:47:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368647#M163076</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-07T16:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using two seperate inputlookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368648#M163077</link>
      <description>&lt;P&gt;Cool, useful to know, thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 16:52:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-two-seperate-inputlookups/m-p/368648#M163077</guid>
      <dc:creator>samwatson45</dc:creator>
      <dc:date>2018-02-07T16:52:48Z</dc:date>
    </item>
  </channel>
</rss>

