<?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: How to compare to a lookup table and pull fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370108#M109013</link>
    <description>&lt;P&gt;The lookup simply adds fieldB to events in index=foo where fieldA is matched. If fieldA is not matched, the event still shows up, but fieldB is null. Therefore the not isnull fulfills the "show only results matching fieldA in foo2" requirement.&lt;/P&gt;</description>
    <pubDate>Tue, 09 May 2017 17:12:34 GMT</pubDate>
    <dc:creator>chrishartsock</dc:creator>
    <dc:date>2017-05-09T17:12:34Z</dc:date>
    <item>
      <title>How to compare to a lookup table and pull fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370099#M109004</link>
      <description>&lt;P&gt;I have an index=foo and a lookup table defined as foo2.  How can I compare my index to the table to show only results matching fieldA in foo2 and pulling fieldB from foo2?&lt;/P&gt;

&lt;P&gt;I have tried below and many variations of it but I get no results.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo
[| inputlookup foo2 | fields fieldA]

index=foo
| lookup foo2 fieldA OUTPUT fieldB
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 May 2017 15:00:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370099#M109004</guid>
      <dc:creator>mgrosholz</dc:creator>
      <dc:date>2017-05-09T15:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare to a lookup table and pull fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370100#M109005</link>
      <description>&lt;P&gt;Is fieldA the same name in foo and foo2?&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 15:19:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370100#M109005</guid>
      <dc:creator>chrishartsock</dc:creator>
      <dc:date>2017-05-09T15:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare to a lookup table and pull fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370101#M109006</link>
      <description>&lt;P&gt;No.  It is not.  Should it be?  &lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 15:21:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370101#M109006</guid>
      <dc:creator>mgrosholz</dc:creator>
      <dc:date>2017-05-09T15:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare to a lookup table and pull fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370102#M109007</link>
      <description>&lt;P&gt;Not necessarily. But since it is different you will need to rename fieldA to what it is in foo:&lt;/P&gt;

&lt;P&gt;index=foo&lt;BR /&gt;
| lookup foo2 fieldA AS fieldA_name_in_foo OUTPUT fieldB&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:59:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370102#M109007</guid>
      <dc:creator>chrishartsock</dc:creator>
      <dc:date>2020-09-29T13:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare to a lookup table and pull fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370103#M109008</link>
      <description>&lt;P&gt;Sweet we are getting somewhere!  I got the output of fieldB but results are still showing all results of fieldA not just what populates compared to the lookup table.  &amp;lt;--does that make sense?&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 15:29:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370103#M109008</guid>
      <dc:creator>mgrosholz</dc:creator>
      <dc:date>2017-05-09T15:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare to a lookup table and pull fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370104#M109009</link>
      <description>&lt;P&gt;Ultimately, you should be able to do:&lt;/P&gt;

&lt;P&gt;index=foo&lt;BR /&gt;
| lookup foo2 fieldA AS fieldA_name_in_foo OUTPUT fieldB&lt;BR /&gt;
| where NOT isnull(fieldB)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:59:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370104#M109009</guid>
      <dc:creator>chrishartsock</dc:creator>
      <dc:date>2020-09-29T13:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare to a lookup table and pull fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370105#M109010</link>
      <description>&lt;P&gt;I had a typo on my end.  It works.&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 15:35:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370105#M109010</guid>
      <dc:creator>mgrosholz</dc:creator>
      <dc:date>2017-05-09T15:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare to a lookup table and pull fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370106#M109011</link>
      <description>&lt;P&gt;Why did you add the not null for fieldB?&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 15:36:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370106#M109011</guid>
      <dc:creator>mgrosholz</dc:creator>
      <dc:date>2017-05-09T15:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare to a lookup table and pull fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370107#M109012</link>
      <description>&lt;P&gt;Oh, and thanks btw.&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 15:41:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370107#M109012</guid>
      <dc:creator>mgrosholz</dc:creator>
      <dc:date>2017-05-09T15:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare to a lookup table and pull fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370108#M109013</link>
      <description>&lt;P&gt;The lookup simply adds fieldB to events in index=foo where fieldA is matched. If fieldA is not matched, the event still shows up, but fieldB is null. Therefore the not isnull fulfills the "show only results matching fieldA in foo2" requirement.&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 17:12:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-to-a-lookup-table-and-pull-fields/m-p/370108#M109013</guid>
      <dc:creator>chrishartsock</dc:creator>
      <dc:date>2017-05-09T17:12:34Z</dc:date>
    </item>
  </channel>
</rss>

