<?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: Advanced filtering on |inputlookup command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Advanced-filtering-on-inputlookup-command/m-p/497978#M194841</link>
    <description>&lt;P&gt;This is extremely cool. I never thought about inserting a subsearch to substitute a literal value! If I had more than 20 points, I'd reward you plenty. Thanks! &lt;/P&gt;</description>
    <pubDate>Fri, 04 Oct 2019 13:50:32 GMT</pubDate>
    <dc:creator>ololdach</dc:creator>
    <dc:date>2019-10-04T13:50:32Z</dc:date>
    <item>
      <title>Advanced filtering on |inputlookup command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Advanced-filtering-on-inputlookup-command/m-p/497975#M194838</link>
      <description>&lt;P&gt;A large kv lookup table (&amp;gt;2M entries and growing) holds metadata and is processed on a regular schedule to solve some complex correlations. The task at hand is to make accessing the last 5k entries more efficient. &lt;/P&gt;

&lt;P&gt;The current search looks like this: |inputlookup kvbig | addinfo | where time&amp;gt;info_min_time | ... Runtime about 80s&lt;/P&gt;

&lt;P&gt;To speed things up, I'd like to include the where in the lookup and tried:&lt;BR /&gt;
|makeresults | addinfo | eval testme=round(info_min_time-3600,0) | inputlookup kvbig append=true where (time&amp;gt;testme) |...&lt;/P&gt;

&lt;P&gt;The above delivered all 2M results and did not work whereas the second attempt, hardcoding the start time:&lt;BR /&gt;
|makeresults | addinfo | eval testme=round(info_min_time-3600,0) | inputlookup kvbig append=true where (time&amp;gt;1570172400) |...&lt;/P&gt;

&lt;P&gt;has worked like a charm returning the wanted 5k results in a splitsecond.&lt;/P&gt;

&lt;P&gt;Question: How can I inject a calculated field/result/parameter into the inputlookup where clause that does NOT come from a UI token? (since it's a scheduled search, no such luck as to have tokens around)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:28:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Advanced-filtering-on-inputlookup-command/m-p/497975#M194838</guid>
      <dc:creator>ololdach</dc:creator>
      <dc:date>2020-09-30T02:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced filtering on |inputlookup command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Advanced-filtering-on-inputlookup-command/m-p/497976#M194839</link>
      <description>&lt;P&gt;Unfortunately the where clause in inputlookup doesn't support the full eval syntax. Otherwise we could have used something like "...where (time&amp;gt;now()-3600)"&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 09:35:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Advanced-filtering-on-inputlookup-command/m-p/497976#M194839</guid>
      <dc:creator>ololdach</dc:creator>
      <dc:date>2019-10-04T09:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced filtering on |inputlookup command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Advanced-filtering-on-inputlookup-command/m-p/497977#M194840</link>
      <description>&lt;P&gt;Try turning the query around.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup kvbig append=true where (time&amp;gt;[|makeresults | addinfo | eval testme=round(info_min_time-3600,0) | return $testme]) |...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Oct 2019 13:04:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Advanced-filtering-on-inputlookup-command/m-p/497977#M194840</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-04T13:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced filtering on |inputlookup command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Advanced-filtering-on-inputlookup-command/m-p/497978#M194841</link>
      <description>&lt;P&gt;This is extremely cool. I never thought about inserting a subsearch to substitute a literal value! If I had more than 20 points, I'd reward you plenty. Thanks! &lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 13:50:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Advanced-filtering-on-inputlookup-command/m-p/497978#M194841</guid>
      <dc:creator>ololdach</dc:creator>
      <dc:date>2019-10-04T13:50:32Z</dc:date>
    </item>
  </channel>
</rss>

