<?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: How to get multiple lookups to work in a single search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/556897#M158172</link>
    <description>&lt;P&gt;There can be a number of reasons why you get this message.&lt;BR /&gt;check permissions on both the lookup file and definition knowledge objects.&lt;BR /&gt;&lt;BR /&gt;If you&amp;nbsp; use the OUTPUT field, any misspellings will cause it to fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helped&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jun 2021 18:36:02 GMT</pubDate>
    <dc:creator>jrindfleisch</dc:creator>
    <dc:date>2021-06-23T18:36:02Z</dc:date>
    <item>
      <title>How to get multiple lookups to work in a single search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/139908#M38532</link>
      <description>&lt;P&gt;So I am attempting to perform two lookups in a single query, and i'm receiving an error.  if I remove the second lookup (doesn't matter which one) then my search returns results normally. &lt;/P&gt;

&lt;P&gt;Q: is there a way to get multiple lookups to occur in a single query?&lt;/P&gt;

&lt;P&gt;This is my Search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index sourcetype="iis" sc_status=2* |lookup status_codes.csv status AS sc_status | lookup my_lookup2.csv field2 AS host | stats count by status_description | rename status_description AS "Status Description"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The error that is returned is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;hostname&amp;gt; Streamed search execute failed because: Error in 'lookup' command: The lookup table 'my_lookup2.csv' does not exist.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I know the lookup table exists because I can see it on the machine in both the UI and the backend, and it's shared globally. Also, if I attempt to query 'my_lookup2.csv' in a search using it as the only lookup table, then the search works just fine. &lt;/P&gt;

&lt;P&gt;Is this possible, or a limitation of splunk? &lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2015 22:14:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/139908#M38532</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2015-02-09T22:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get multiple lookups to work in a single search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/139909#M38533</link>
      <description>&lt;P&gt;Un-related, your query is not using any fields from 2nd lookup, so do you really need that? &lt;BR /&gt;
Also, its recommended to perform the lookup further to the right of the search (towards end), preferably after some aggregation. So give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index sourcetype="iis" sc_status=2* | stats count by host, sc_status | lookup status_codes.csv status AS sc_status | lookup my_lookup2.csv field2 AS host | stats sum(count) as count by status_description | rename status_description AS "Status Description"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Feb 2015 22:35:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/139909#M38533</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-02-09T22:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get multiple lookups to work in a single search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/139910#M38534</link>
      <description>&lt;P&gt;No go unfortunately, this didn't get me what I was looking for. &lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2015 18:21:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/139910#M38534</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2015-02-12T18:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get multiple lookups to work in a single search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/139911#M38535</link>
      <description>&lt;P&gt;I figured this one out. This is the query in working form:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" sourcetype="iis" sc_status=2* | localop | lookup status_codes.csv status AS sc_status | lookup myLookup.csv nt_host AS host | search "Field 1"="Value1" | stats count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Feb 2015 18:24:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/139911#M38535</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2015-02-12T18:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get multiple lookups to work in a single search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/139912#M38536</link>
      <description>&lt;P&gt;How execution of this SPL (that contains two lookup commands) from local search head and not from the search peers resolve the issue?&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jun 2018 17:00:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/139912#M38536</guid>
      <dc:creator>ppuru</dc:creator>
      <dc:date>2018-06-09T17:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get multiple lookups to work in a single search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/556897#M158172</link>
      <description>&lt;P&gt;There can be a number of reasons why you get this message.&lt;BR /&gt;check permissions on both the lookup file and definition knowledge objects.&lt;BR /&gt;&lt;BR /&gt;If you&amp;nbsp; use the OUTPUT field, any misspellings will cause it to fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helped&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 18:36:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-multiple-lookups-to-work-in-a-single-search/m-p/556897#M158172</guid>
      <dc:creator>jrindfleisch</dc:creator>
      <dc:date>2021-06-23T18:36:02Z</dc:date>
    </item>
  </channel>
</rss>

