<?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 help: Replace column result with value in other lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583302#M203113</link>
    <description>&lt;P&gt;They are trying to combine one csv/lookup with the values of a second lookup.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you were going to go the lookup route you would do the generating search, then run the lookup against the 'correct' priority data, to return the correct priority as something like 'new_priority', and then coalesce on that.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Feb 2022 23:52:01 GMT</pubDate>
    <dc:creator>TheLawsOfChaos</dc:creator>
    <dc:date>2022-02-01T23:52:01Z</dc:date>
    <item>
      <title>Lookup help: Replace column result with value in other lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583137#M203055</link>
      <description>&lt;P&gt;Hey Splunkers. Quick question regarding my lookup. I have the Identity lookup with ES and I'd like to replace the 'priority' column value with the value in a separate lookup.&lt;/P&gt;&lt;P&gt;For example, my (abbreviated) identity lookup looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;identity prefix   nick     priority
------   ------  -------   ---------
asmith (blank) Adam Smith   medium
cjean  (blank) Carol Jean   medium
bjean  (blank) Billy Jean   medium&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to replace the priority value 'medium' in the above lookup with the value that matches my separate lookup that looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;identity      priority
------       ---------
asmith          high
cjean           low&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the original lookup would look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;identity prefix   nick     priority
------   ------  -------   ---------
asmith (blank) Adam Smith  high
cjean  (blank) Carol Jean  low
bjean  (blank) Billy Jean  medium&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having trouble getting started on the search. How would I do this so that matches are updated but if no match is present than keep the original value? Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 20:16:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583137#M203055</guid>
      <dc:creator>96nick</dc:creator>
      <dc:date>2022-01-31T20:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup help: Replace column result with value in other lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583151#M203061</link>
      <description>&lt;LI-CODE lang="markup"&gt;| lookup firstlookup
| rename priority as default_proirity
| lookup secondlookup
| eval priority=coalesce(priority,default_proirity)
| fields - default_priority&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 31 Jan 2022 22:37:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583151#M203061</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-31T22:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup help: Replace column result with value in other lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583281#M203096</link>
      <description>&lt;P&gt;So this is close, but think you want inputlookup instead:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup firstlookup
| rename priority as default_priority 
| inputlookup secondlookup
| eval priority=coalesce(priority,default_priority )
| fields - default_priority &lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 01 Feb 2022 21:37:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583281#M203096</guid>
      <dc:creator>TheLawsOfChaos</dc:creator>
      <dc:date>2022-02-01T21:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup help: Replace column result with value in other lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583282#M203097</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup firstlookup
| join type=left identity
    [| inputlookup secondlookup ] &lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;This will accomplish what you are trying to do. If secondlookup doesn't have a priority then the priority from firstlookup will be present.&amp;nbsp; If you want to ignore the initial priorty complete in firstlookup just do:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup firstlookup
| fields - priority
| join type=left identity
    [| inputlookup secondlookup ] &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="combine_lookups.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17779iCDC9B84554C13168/image-size/large?v=v2&amp;amp;px=999" role="button" title="combine_lookups.png" alt="combine_lookups.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 22:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583282#M203097</guid>
      <dc:creator>bmatlock_splunk</dc:creator>
      <dc:date>2022-02-01T22:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup help: Replace column result with value in other lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583286#M203099</link>
      <description>&lt;P&gt;You probably don't want inputlookup, certainly not two of them, they are generating commands. I was assuming there was already a search ahead of the lookups I was proposing, and this solution was to reset the priority found by the first lookup with the priority found by the second lookup where it was available (which seemed to be the essence of the original question).&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 22:26:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583286#M203099</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-02-01T22:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup help: Replace column result with value in other lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583302#M203113</link>
      <description>&lt;P&gt;They are trying to combine one csv/lookup with the values of a second lookup.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you were going to go the lookup route you would do the generating search, then run the lookup against the 'correct' priority data, to return the correct priority as something like 'new_priority', and then coalesce on that.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 23:52:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-help-Replace-column-result-with-value-in-other-lookup/m-p/583302#M203113</guid>
      <dc:creator>TheLawsOfChaos</dc:creator>
      <dc:date>2022-02-01T23:52:01Z</dc:date>
    </item>
  </channel>
</rss>

