<?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 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/lookup-help/m-p/94710#M24465</link>
    <description>&lt;P&gt;You could try it - I think the real question is whether you can automatically lookup based on a field obtained from a lookup. In other words, can lookups be recursive? &lt;/P&gt;

&lt;P&gt;I'm not sure if the automatic lookup will work, but a manual lookup will work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | lookup user_lookup manager_user_id as user_id OUTPUT name as manager_name manager_user_id as managers_manager
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and you could put this in a macro called lookup_manager so that you would only have to type&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | `lookup_manager` | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;BTW, my example assumes that you named the lookup &lt;CODE&gt;user_lookup&lt;/CODE&gt;.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Mar 2012 20:18:03 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2012-03-16T20:18:03Z</dc:date>
    <item>
      <title>lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-help/m-p/94709#M24464</link>
      <description>&lt;P&gt;I have a lookup table, and then I added another field to the table (csv)&lt;/P&gt;

&lt;P&gt;The original table contained some of the following:&lt;/P&gt;

&lt;P&gt;user_id, name, company&lt;/P&gt;

&lt;P&gt;I have now added the manager_user_id to the table (csv)&lt;/P&gt;

&lt;P&gt;user_id, name, company, manager_user_id&lt;/P&gt;

&lt;P&gt;I have an automatic lookup that links user=user_id, so when I perform a search the following fields show up:&lt;/P&gt;

&lt;P&gt;name, company, etc...&lt;/P&gt;

&lt;P&gt;The manager_user_id will can also be matched to the user_id&lt;/P&gt;

&lt;P&gt;What I want to do is perform a lookup of the manager_user_id against the table where manager_user_id = user_id to enrich my data.&lt;/P&gt;

&lt;P&gt;I would love to have an automatic lookup, but I am unsure what might happen with the fields from the automatic lookup where user=user_id&lt;/P&gt;

&lt;P&gt;So, in my case, manager_user_id and user = a field in the table called user_id&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:31:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-help/m-p/94709#M24464</guid>
      <dc:creator>mcbradford</dc:creator>
      <dc:date>2020-09-28T11:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-help/m-p/94710#M24465</link>
      <description>&lt;P&gt;You could try it - I think the real question is whether you can automatically lookup based on a field obtained from a lookup. In other words, can lookups be recursive? &lt;/P&gt;

&lt;P&gt;I'm not sure if the automatic lookup will work, but a manual lookup will work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | lookup user_lookup manager_user_id as user_id OUTPUT name as manager_name manager_user_id as managers_manager
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and you could put this in a macro called lookup_manager so that you would only have to type&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | `lookup_manager` | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;BTW, my example assumes that you named the lookup &lt;CODE&gt;user_lookup&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2012 20:18:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-help/m-p/94710#M24465</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-03-16T20:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-help/m-p/94711#M24466</link>
      <description>&lt;P&gt;Is it possible to do a lookup in the same way that you do it as a SUMIFS equation in Excel.  I understand that this is not an answer, but I was wondering if Splunk data can be approached that way?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2016 19:33:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-help/m-p/94711#M24466</guid>
      <dc:creator>helenwall</dc:creator>
      <dc:date>2016-06-30T19:33:53Z</dc:date>
    </item>
  </channel>
</rss>

