<?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: Is it possible to add only some specific values from lookup? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-only-some-specific-values-from-lookup/m-p/374039#M109948</link>
    <description>&lt;P&gt;So what you want is to make the priority of admin users as High, no matter what is coming from your dbxquery.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;dbxquery  
| lookup my_lookup.csv user OUTPUT user as AdminUser
| eval priority=if(user==AdminUser,"high", priority)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let use know if it works&lt;/P&gt;</description>
    <pubDate>Sat, 24 Mar 2018 07:22:04 GMT</pubDate>
    <dc:creator>tiagofbmm</dc:creator>
    <dc:date>2018-03-24T07:22:04Z</dc:date>
    <item>
      <title>Is it possible to add only some specific values from lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-only-some-specific-values-from-lookup/m-p/374038#M109947</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;

&lt;P&gt;I use a &lt;CODE&gt;dbxquery&lt;/CODE&gt; to import some user data including user priority. The result looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user    | priority
Bob     | low
Tom     | medium
Jack    | high
Bill    | low
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;At the same time I have a dynamic lookup table with users which currently has admin rights and I'd like to evaluate a priority for those users. The lookup looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user
Bob
Tom
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I’m trying to do is to add this line to my &lt;CODE&gt;dbxquery&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval priority=if(isnotnull(|lookup my_lookup.csv user OUTPUT user), "high", priority)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it doesn't work.&lt;/P&gt;

&lt;P&gt;I tried to add a new column to my lookup table to make it look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; user    | priority
 Bob     | high
 Tom     | high
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and then simply add this line to my &lt;CODE&gt;dbxquery&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| lookup my_lookup.csv user OUTPUT priority
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it doesn't work either. It actually erases a priority for all users who is not listed in lookup.&lt;/P&gt;

&lt;P&gt;Do you have an advice how can I solve that issue?&lt;/P&gt;

&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:20:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-only-some-specific-values-from-lookup/m-p/374038#M109947</guid>
      <dc:creator>AlexeySh</dc:creator>
      <dc:date>2018-03-23T16:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add only some specific values from lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-only-some-specific-values-from-lookup/m-p/374039#M109948</link>
      <description>&lt;P&gt;So what you want is to make the priority of admin users as High, no matter what is coming from your dbxquery.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;dbxquery  
| lookup my_lookup.csv user OUTPUT user as AdminUser
| eval priority=if(user==AdminUser,"high", priority)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let use know if it works&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2018 07:22:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-only-some-specific-values-from-lookup/m-p/374039#M109948</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-24T07:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add only some specific values from lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-only-some-specific-values-from-lookup/m-p/374040#M109949</link>
      <description>&lt;P&gt;Great!&lt;BR /&gt;
That's exactly what a was searching for.&lt;BR /&gt;
Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2018 09:41:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-only-some-specific-values-from-lookup/m-p/374040#M109949</guid>
      <dc:creator>AlexeySh</dc:creator>
      <dc:date>2018-03-24T09:41:04Z</dc:date>
    </item>
  </channel>
</rss>

