<?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: Create search query where events match lookup table 'fieldA' column (all have values) but exclude events that do not have a value in 'fieldB' column. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378449#M110926</link>
    <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;YouShouldAlwaysSpecifyAnIndex&amp;gt; AND sourcetype=&amp;lt;AndSourcetypeToo&amp;gt; AND
[|inputlookup &amp;lt;YourLookupNameHere&amp;gt;
| fillnull fieldA fieldB value="T3mpPl4c3h0ld3r"
| format
| rex field=search mode=sed "s/(\S+)=\"T3mpPl4c3h0ld3r\"/NOT \1=\"*\"/"]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 04 Jul 2019 00:20:09 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-07-04T00:20:09Z</dc:date>
    <item>
      <title>Create search query where events match lookup table 'fieldA' column (all have values) but exclude events that do not have a value in 'fieldB' column.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378445#M110922</link>
      <description>&lt;P&gt;Example Lookup Table entries:&lt;BR /&gt;
fieldA      fieldB&lt;BR /&gt;
value       value&lt;BR /&gt;
value       'blank'&lt;BR /&gt;
value       value&lt;/P&gt;

&lt;P&gt;Show events where 'fieldA' matches but exclude events where 'fieldB' is blank, within the lookup table.  'fieldB' does not exist in any of the events.&lt;/P&gt;

&lt;P&gt;Test query (that does not work):&lt;BR /&gt;
 | lookup  fieldA | search fieldB != ""&lt;/P&gt;

&lt;P&gt;I believe the query above will match events that contain 'fieldA' but then searches the events where fieldB is blank within the event.  Again, the events do not contain 'fieldB' and I'm not looking to append any other fields within the lookup table.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 15:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378445#M110922</guid>
      <dc:creator>tinanicole21</dc:creator>
      <dc:date>2019-07-03T15:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create search query where events match lookup table 'fieldA' column (all have values) but exclude events that do not have a value in 'fieldB' column.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378446#M110923</link>
      <description>&lt;P&gt;| inputlookup Lookup_Table&lt;BR /&gt;
| table fieldA fieldB&lt;BR /&gt;
| where NOT fieldB == " "&lt;/P&gt;

&lt;P&gt;This should work.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 18:28:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378446#M110923</guid>
      <dc:creator>sandeepmakkena</dc:creator>
      <dc:date>2019-07-03T18:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create search query where events match lookup table 'fieldA' column (all have values) but exclude events that do not have a value in 'fieldB' column.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378447#M110924</link>
      <description>&lt;P&gt;To clarify, here is the full search query example:&lt;/P&gt;

&lt;P&gt;| lookup fieldA | search fieldB != ""&lt;/P&gt;

&lt;P&gt;I'm looking to display only sourcetype events that contain an entry in fieldA and fieldB of the lookup table, and not the ones that contain an entry in fieldA where fieldB is blank.  I'm not looking to display specific rows within the lookup table.  Thanks for the suggestion though.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 18:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378447#M110924</guid>
      <dc:creator>tinanicole21</dc:creator>
      <dc:date>2019-07-03T18:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create search query where events match lookup table 'fieldA' column (all have values) but exclude events that do not have a value in 'fieldB' column.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378448#M110925</link>
      <description>&lt;P&gt;| inputlookup Lookup_Table&lt;BR /&gt;
| eventstats values( fieldA) as  tmp&lt;BR /&gt;
| eval found=if(isnull(mvfind(tmp, fieldB)),0,1) | where found=1 &lt;BR /&gt;
| table fieldA fieldB&lt;BR /&gt;
| where NOT fieldB == " "&lt;/P&gt;

&lt;P&gt;Try this.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 18:53:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378448#M110925</guid>
      <dc:creator>sandeepmakkena</dc:creator>
      <dc:date>2019-07-03T18:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create search query where events match lookup table 'fieldA' column (all have values) but exclude events that do not have a value in 'fieldB' column.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378449#M110926</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;YouShouldAlwaysSpecifyAnIndex&amp;gt; AND sourcetype=&amp;lt;AndSourcetypeToo&amp;gt; AND
[|inputlookup &amp;lt;YourLookupNameHere&amp;gt;
| fillnull fieldA fieldB value="T3mpPl4c3h0ld3r"
| format
| rex field=search mode=sed "s/(\S+)=\"T3mpPl4c3h0ld3r\"/NOT \1=\"*\"/"]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jul 2019 00:20:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378449#M110926</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-04T00:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create search query where events match lookup table 'fieldA' column (all have values) but exclude events that do not have a value in 'fieldB' column.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378450#M110927</link>
      <description>&lt;P&gt;I will give it a shot and will report back with my results.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 16:56:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378450#M110927</guid>
      <dc:creator>tinanicole21</dc:creator>
      <dc:date>2019-07-09T16:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create search query where events match lookup table 'fieldA' column (all have values) but exclude events that do not have a value in 'fieldB' column.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378451#M110928</link>
      <description>&lt;P&gt;I will give it a shot and will report back with my results.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 16:56:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378451#M110928</guid>
      <dc:creator>tinanicole21</dc:creator>
      <dc:date>2019-07-09T16:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create search query where events match lookup table 'fieldA' column (all have values) but exclude events that do not have a value in 'fieldB' column.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378452#M110929</link>
      <description>&lt;P&gt;How did it go?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 05:51:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378452#M110929</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-11T05:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create search query where events match lookup table 'fieldA' column (all have values) but exclude events that do not have a value in 'fieldB' column.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378453#M110930</link>
      <description>&lt;P&gt;Our team has not had a chance to try it yet, due to some other real-world issues.  I'm pretty optimistic that this should work for them.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 19:42:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-search-query-where-events-match-lookup-table-fieldA/m-p/378453#M110930</guid>
      <dc:creator>tinanicole21</dc:creator>
      <dc:date>2019-07-11T19:42:11Z</dc:date>
    </item>
  </channel>
</rss>

