<?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 in column A, grab value from column B, compare to a field in search result and don't display if values match? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-in-column-A-grab-value-from-column-B-compare-to-a-field/m-p/351694#M104089</link>
    <description>&lt;P&gt;You can try out following search . &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=test |table user, countery_abbveriation | lookup country_table countery_abbveriation output country | table user country countery_abbveriation
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Replace the column name, index, source type as apporpriate to your environment.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Aug 2017 13:27:31 GMT</pubDate>
    <dc:creator>hardikJsheth</dc:creator>
    <dc:date>2017-08-04T13:27:31Z</dc:date>
    <item>
      <title>Lookup in column A, grab value from column B, compare to a field in search result and don't display if values match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-in-column-A-grab-value-from-column-B-compare-to-a-field/m-p/351693#M104088</link>
      <description>&lt;P&gt;Hey guys, I have a search that gives me a login from a country along with the user and the user's "work country".  Unfortunately the work country is an abbreviation so I have a lookup table that contains a list of countries and their abbreviations.&lt;/P&gt;

&lt;P&gt;What I want to do is lookup the Country in the lookup table column A, grab the value in column B from the lookup table and then if it matches the user's work country do not display the line in my search results.&lt;/P&gt;

&lt;P&gt;I've searched and tried a ton of things with no luck.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;T&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 12:58:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-in-column-A-grab-value-from-column-B-compare-to-a-field/m-p/351693#M104088</guid>
      <dc:creator>timm747747</dc:creator>
      <dc:date>2017-08-04T12:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup in column A, grab value from column B, compare to a field in search result and don't display if values match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-in-column-A-grab-value-from-column-B-compare-to-a-field/m-p/351694#M104089</link>
      <description>&lt;P&gt;You can try out following search . &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=test |table user, countery_abbveriation | lookup country_table countery_abbveriation output country | table user country countery_abbveriation
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Replace the column name, index, source type as apporpriate to your environment.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 13:27:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-in-column-A-grab-value-from-column-B-compare-to-a-field/m-p/351694#M104089</guid>
      <dc:creator>hardikJsheth</dc:creator>
      <dc:date>2017-08-04T13:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup in column A, grab value from column B, compare to a field in search result and don't display if values match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-in-column-A-grab-value-from-column-B-compare-to-a-field/m-p/351695#M104090</link>
      <description>&lt;P&gt;I probably should have posted the search I'm using.  The lookup table is called country_abbrev.csv and it has a column labeled country which is the full country name and a column labeled "user's work country" which is the country abbreviation.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats prestats=false local=false summariesonly=true count from datamodel=Authentication WHERE 
`aaa_src_external` by Authentication.app,Authentication.src, Authentication.user,Authentication.action,_time, index 
| iplocation Authentication.src 
| search Country!="United States" AND Country!=Canada AND Authentication.action=success AND Authentication.app!=Exchange AND index!=amp_* 
| rename Authentication.user as user 
| `get_identity4events(user)` 
| fields _time, Authentication.app,Authentication.src,Country,user,user_identity_tag,user_work_city,user_work_country,user_managedBy 
| rename Authentication.app as "Authentication App",Authentication.src as "Authentication Source", user as User, user_identity_tag as "User Identity Tag", user_work_city as "User's Work City", user_work_country as "User's Work Country", user_managedBy as "User's Manager"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Aug 2017 13:35:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-in-column-A-grab-value-from-column-B-compare-to-a-field/m-p/351695#M104090</guid>
      <dc:creator>timm747747</dc:creator>
      <dc:date>2017-08-04T13:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup in column A, grab value from column B, compare to a field in search result and don't display if values match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-in-column-A-grab-value-from-column-B-compare-to-a-field/m-p/351696#M104091</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats prestats=false local=false summariesonly=true count from datamodel=Authentication WHERE `aaa_src_external` by Authentication.app,Authentication.src, Authentication.user,Authentication.action,_time, index 
| iplocation Authentication.src 
| search Country!="United States" AND Country!=Canada AND Authentication.action=success AND Authentication.app!=Exchange AND index!=amp_* 
| rename Authentication.user as user 
| `get_identity4events(user)`


| lookup country_abbrev.csv user_work_country OUTPUT Country AS user_work_country
| where user_work_country = Country

| fields _time Authentication.app Authentication.src Country user user_identity_tag user_work_city user_work_country user_managedBy 
| rename Authentication.app as "Authentication App",Authentication.src as "Authentication Source", user as User, user_identity_tag as "User Identity Tag", user_work_city as "User's Work City", user_work_country as "User's Work Country", user_managedBy as "User's Manager"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Aug 2017 14:17:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-in-column-A-grab-value-from-column-B-compare-to-a-field/m-p/351696#M104091</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-04T14:17:54Z</dc:date>
    </item>
  </channel>
</rss>

