<?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 I am using a lookup table and I only want the results that have a match in the look up table. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324941#M176956</link>
    <description>&lt;P&gt;lookup Down.csv node AS host, BBB AS Circuit &lt;BR /&gt;
Table host,Circuit,msg,_time,node, BBB&lt;/P&gt;

&lt;P&gt;I only want events to hit the table that have a match from the lookup.&lt;BR /&gt;
Currently I am getting all events and the ones that do match have the fields populated with data and the other events are in the table with blanks. &lt;/P&gt;</description>
    <pubDate>Tue, 23 Jan 2018 17:38:13 GMT</pubDate>
    <dc:creator>jamesfdally</dc:creator>
    <dc:date>2018-01-23T17:38:13Z</dc:date>
    <item>
      <title>I am using a lookup table and I only want the results that have a match in the look up table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324941#M176956</link>
      <description>&lt;P&gt;lookup Down.csv node AS host, BBB AS Circuit &lt;BR /&gt;
Table host,Circuit,msg,_time,node, BBB&lt;/P&gt;

&lt;P&gt;I only want events to hit the table that have a match from the lookup.&lt;BR /&gt;
Currently I am getting all events and the ones that do match have the fields populated with data and the other events are in the table with blanks. &lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 17:38:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324941#M176956</guid>
      <dc:creator>jamesfdally</dc:creator>
      <dc:date>2018-01-23T17:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: I am using a lookup table and I only want the results that have a match in the look up table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324942#M176957</link>
      <description>&lt;P&gt;you can use &lt;CODE&gt;join&lt;/CODE&gt; command...if you can provide sample events then i can helpwith query&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 17:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324942#M176957</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-01-23T17:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: I am using a lookup table and I only want the results that have a match in the look up table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324943#M176958</link>
      <description>&lt;P&gt;If you want to save search processing time and if you want it run fast. I would suggest you to add one more column in csv say &lt;CODE&gt;marker&lt;/CODE&gt; and put value &lt;CODE&gt;1&lt;/CODE&gt; in that for every row.&lt;/P&gt;

&lt;P&gt;Then run below search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lookup Down.csv node AS host, BBB AS Circuit 
OUTPUT marker | search marker=* | Table host,Circuit,msg,_time,node, BBB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will give your only common values between lookup and raw data...if you already have something in lookup file which is not in raw data then you can OUTPUT that field to raw data and then search for that field which will give you only match events .&lt;/P&gt;

&lt;P&gt;Let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 17:57:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324943#M176958</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-23T17:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: I am using a lookup table and I only want the results that have a match in the look up table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324944#M176959</link>
      <description>&lt;P&gt;There's actually no good reason to add another field into the lookup, assuming there already exists any column in the lookup table that is populated for every row. In fact, you will always know for sure that the fields &lt;CODE&gt;node&lt;/CODE&gt; and &lt;CODE&gt;BBB&lt;/CODE&gt; will exist, so you could just as easily do this without modifying the lookup table:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt;
| lookup Down.csv node AS host, BBB AS Circuit 
| where isnotnull(node) 
| Table host,Circuit,msg,_time,node, BBB
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jan 2018 18:18:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324944#M176959</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-01-23T18:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: I am using a lookup table and I only want the results that have a match in the look up table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324945#M176960</link>
      <description>&lt;P&gt;In addition to the approach suggested by @mayurr98, there is also the option of using the fields in the lookup table as input into the base search to limit the result set to events that have corresponding entries in the lookup table. Here's how to do that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search [ | inputlookup Down.csv | fields node BBB | format ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that there is no &lt;CODE&gt;|&lt;/CODE&gt; between your base search and the subsearch. What will come out of the subsearch will look like this:&lt;/P&gt;

&lt;PRE&gt;((node="value1" AND BBB="val1") OR (node="value2" AND BBB="val2") OR (node="value3" AND BBB="val3")...)  &lt;/PRE&gt;

&lt;P&gt;With this approach, the base search will filter down to only events that have corresponding entries in the lookup file. If you still need to lookup the events in your lookup file to &lt;CODE&gt;OUTPUT&lt;/CODE&gt; values from other columns in the csv, you can append the &lt;CODE&gt;lookup&lt;/CODE&gt; as usual after the base search.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 18:44:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324945#M176960</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-01-23T18:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: I am using a lookup table and I only want the results that have a match in the look up table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324946#M176961</link>
      <description>&lt;P&gt;Thank you for all the input. I am using the isnotnull option after the lookup, but I was hoping to use the lookup table as a filter.&lt;BR /&gt;
My base search results need to be filtered by 2 fields in the lookup table. If they match then I need only the raw events that match and add some data from the lookup table to the raw events that are left over.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 21:02:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324946#M176961</guid>
      <dc:creator>jamesfdally</dc:creator>
      <dc:date>2018-01-23T21:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: I am using a lookup table and I only want the results that have a match in the look up table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324947#M176962</link>
      <description>&lt;P&gt;That's exactly what my answer below enables you to do. Have you tried it? If it's not working as you expected, I can help you troubleshoot.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 21:10:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324947#M176962</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-01-25T21:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: I am using a lookup table and I only want the results that have a match in the look up table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324948#M176963</link>
      <description>&lt;P&gt;Thanks for all the help!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 14:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324948#M176963</guid>
      <dc:creator>jamesfdally</dc:creator>
      <dc:date>2018-01-30T14:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: I am using a lookup table and I only want the results that have a match in the look up table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324949#M176964</link>
      <description>&lt;P&gt;This works also&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 14:47:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324949#M176964</guid>
      <dc:creator>jamesfdally</dc:creator>
      <dc:date>2018-01-30T14:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: I am using a lookup table and I only want the results that have a match in the look up table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324950#M176965</link>
      <description>&lt;P&gt;Glad we found you two working solutions! &lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:31:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-using-a-lookup-table-and-I-only-want-the-results-that-have/m-p/324950#M176965</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-01-30T15:31:47Z</dc:date>
    </item>
  </channel>
</rss>

