<?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 search each value of a lookup table and update the corresponding column based on SPL? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612683#M213019</link>
    <description>&lt;P&gt;You are reaching one of the Splunk limits defined in limits.conf. This is why you receive the total number of 50000 records.&amp;nbsp; I would suggest that you mark this thread as resolved, and open a new one regarding the limited number of rows in the result. This will, from one hand, allow others with the same problems as initial one in this thread, to find a solution, and from the other hand you will more likely find the answer to the limited results problem, as more people will take a look at it.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Sep 2022 06:50:20 GMT</pubDate>
    <dc:creator>JacekF</dc:creator>
    <dc:date>2022-09-12T06:50:20Z</dc:date>
    <item>
      <title>How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612472#M212950</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a lookup table table1.csv with following fields: -&lt;/P&gt;&lt;P&gt;index&lt;BR /&gt;sourcetype&lt;BR /&gt;host&lt;BR /&gt;last_seen&lt;BR /&gt;&lt;BR /&gt;I have a custom index: idx1 which has following fields: -&lt;BR /&gt;orig_index&lt;BR /&gt;orig_sourcetype&lt;BR /&gt;orig_host&lt;/P&gt;&lt;P&gt;I need to search each host value from lookup table in the custom index and fetch the max(_time) and then store that value against the same host in last_seen.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the below SPL to build the SPL, but it is not fetching any results: -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|inputlookup table1.csv 
|eval index=lower(index)
|eval host=lower(host)
|eval sourcetype=lower(sourcetype)
|table index, host, sourcetype
|rename index AS orig_index, host AS orig_host, sourcetype AS orig_sourcetype
|format
|eval searchq=search
|eval searchq="index=\"idx1\"".searchq."|stats max(_time) AS last_seen BY orig_index, orig_sourcetype, orig_host"
|search searchq&lt;/LI-CODE&gt;&lt;P&gt;However, when I used&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|fields searchq&lt;/LI-CODE&gt;&lt;P&gt;It gave a proper SPL as the result: -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="idx1" (orig_host="1.1.1.1" AND orig_index="xxx" AND orig_sourcetype="sourcetype1") OR (orig_host="1.1.1.2" AND orig_index="xxx" AND orig_sourcetype="sourcetype2"))|stats max(_time) AS last_time BY orig_index, orig_sourcetype, orig_host&lt;/LI-CODE&gt;&lt;P&gt;And when I run the above resulting SPL as separate search, I get the proper results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thus, please share if there is a way to correct the above approach or if some different approach can help to build the solution.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 20:10:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612472#M212950</guid>
      <dc:creator>Taruchit</dc:creator>
      <dc:date>2022-09-08T20:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612474#M212952</link>
      <description>&lt;P&gt;Let me first clarify the requirements:&amp;nbsp;You want to rebuild table1.csv without having to search the whole history. &amp;nbsp;For example, if your new search outputs only one host, you want a command to update only that host.&lt;/P&gt;&lt;P&gt;Because lookup table is not a real database, there is no easy way to do this. &amp;nbsp;The problem with your approach is that your &lt;FONT face="andale mono,times"&gt;| search searchq&lt;/FONT&gt; cannot operate on any indexed data. &amp;nbsp;The preceding generating command is &lt;FONT face="andale mono,times"&gt;| inputlookup&lt;/FONT&gt;, which only outputs data from table1.csv.&lt;/P&gt;&lt;P&gt;Potentially you can use join or append and some complicated manipulation to achieve what you needed, but it may not be cheaper than simply rebuild the lookup.&lt;/P&gt;&lt;P&gt;To reduce the cost of searching the entire history, consider using&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Tstats#tstats" target="_blank" rel="noopener"&gt;tstats&lt;/A&gt;. &amp;nbsp;For example,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats max(_time) as last_seen where earliest=0 by index sourcetype host&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 08 Sep 2022 20:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612474#M212952</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-09-08T20:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612476#M212954</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your response and sharing your inputs.&lt;/P&gt;&lt;P&gt;I have following points based on your message: -&lt;/P&gt;&lt;P&gt;1. Clarifying the requirement: -&lt;BR /&gt;I have a lookup table: table1.csv which has list of all hosts along with respective index, sourcetype and last_seen (in terms of epoch/unix format).&lt;/P&gt;&lt;P&gt;I also have a summary index (custom index): idx1, which has fields such as: - orig_index, orig_sourcetype, orig_host.&lt;/P&gt;&lt;P&gt;I need to check each host in lookup table and search it for respective orig_index and orig_sourcetype in the summary index, fetch max(_time) value and store it in the lookup table against that host.&lt;/P&gt;&lt;P&gt;Thus, the end goal is to have the lookup table updated with last time when host was being reported in the summary index. And the SPL that will carry out that operation will be scheduled to compute results at definite intervals.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Thus, I will not be able to use |tstats command in the SPL, because I am using a custom index to fetch the results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please share if you need any more details from my end.&lt;/P&gt;&lt;P&gt;Additionally, do we have any way of invoking the value of field "searchq" and use it as an SPL to fetch the results?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 20:51:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612476#M212954</guid>
      <dc:creator>Taruchit</dc:creator>
      <dc:date>2022-09-08T20:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612483#M212957</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/223102"&gt;@Taruchit&lt;/a&gt;&amp;nbsp;Thanks for the explanation. &amp;nbsp;The key question remains whether this summary index idx1 contains complete records or just partial records. &amp;nbsp;If it contains complete records, it is much easier to rebuild table1.csv than trying to selectively update rows. &amp;nbsp;The latter requires random record access, which CSV doesn't support outright; or rather, outputlookup doesn't support. (I assume that your goal is to use outputlookup to update table.)&lt;/P&gt;&lt;P&gt;Assuming that idx1 contains complete records, you can still use stats or tstats agains this index to build table1.csv, e.g.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats max(_time) as last_seen where index=idx1 earliest=0 by orig_index orig_sourcetype orig_host
| rename origin_* as *
| outputlookup table1.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively, you can exclude idx1 in tstats so it searches only original indices, e.g,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats max(_time) as last_seen where index!=idx1 earliest=0 by index sourcetype host
| outputlookup table1.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 22:41:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612483#M212957</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-09-08T22:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612499#M212958</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/223102"&gt;@Taruchit&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;at first I see that you have a fields (searchq) that isn't present in your stats command and, after a tats command you have only the fields in the stats.&lt;/P&gt;&lt;P&gt;In addition you use as kay orig_index, orig_sourcetype and orig_host that you renamed, so they didn't exist more.&lt;/P&gt;&lt;P&gt;Then in the searchq construction, you have to add a space between the first string and the content of search field.&lt;/P&gt;&lt;P&gt;At least, in the lookup you probably have many records,, do you want to execute all of them?&lt;/P&gt;&lt;P&gt;I don't like this approach and I'm not sure that it can run, so anyway, try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup table1.csv 
| eval 
   orig_index=lower(index), 
   orig_host=lower(host), 
   orig_sourcetype=lower(sourcetype)
| eval searchq="index=idx1"." orig_index=".lower(index)." orig_sourcetype=".orig_sourcetype." orig_host=".orig_host
| search searchq&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 04:58:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612499#M212958</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-09T04:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612515#M212963</link>
      <description>&lt;P&gt;Will bellow query meet your requirements?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;index="idx1" 
    [| inputlookup table1.csv 
    | eval index=lower(index) 
    | eval host=lower(host) 
    | eval sourcetype=lower(sourcetype) 
    | table index, host, sourcetype 
    | rename index AS orig_index, host AS orig_host, sourcetype AS orig_sourcetype] 
| stats max(_time) AS last_seen BY orig_index, orig_sourcetype, orig_host
| rename orig_index as index orig_sourcetype as sourcetype orig_host as host
| append [ | inputlookup table1.csv ]
| dedup index sourcetype host 
| outputlookup table1.csv&lt;/LI-CODE&gt;&lt;P&gt;Please note that if you have many rows in your lookup file this solution will be time and resource consuming, as it will need to load the entire lookup twice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 06:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612515#M212963</guid>
      <dc:creator>JacekF</dc:creator>
      <dc:date>2022-09-09T06:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612553#M212975</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224955"&gt;@JacekF&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your inputs and sharing the code. The SPL does meet the requirement, however, I observed some issues for which I will need your guidance.&lt;/P&gt;&lt;P&gt;I executed the code you shared and only removed the last line having outputlookup command, so that I can test and see results before data gets stored in the table. Also, in order to confirm if only the hosts in the lookup table are getting updated or not, I used a search command to filter couple of hosts.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="idx1" 
    [| inputlookup table1.csv 
     | search host="10.1.1.1" OR host="10.1.1.2"
    | eval index=lower(index) 
    | eval host=lower(host) 
    | eval sourcetype=lower(sourcetype) 
    | table index, host, sourcetype 
    | rename index AS orig_index, host AS orig_host, sourcetype AS orig_sourcetype] 
| stats max(_time) AS last_seen BY orig_index, orig_sourcetype, orig_host
| rename orig_index as index orig_sourcetype as sourcetype orig_host as host
| append [ | inputlookup table1.csv ]
| dedup index sourcetype host &lt;/LI-CODE&gt;&lt;P&gt;And I see that in the result the last_seen value for the two hosts is changed to current date time, and remaining have the old values (which is an expected result).&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I noted that the SPL gave 50,000 records [Statistics (50,000)] as the result.&lt;/P&gt;&lt;P&gt;But, when I read the lookup table in separate search: -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|inputlookup table1.csv&lt;/LI-CODE&gt;&lt;P&gt;The above command gives 50,653 records.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thus, I want your help to know why there is mismatch in number of records between the final result and the inputlookup command; and how do we resolve that issue.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 10:59:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612553#M212975</guid>
      <dc:creator>Taruchit</dc:creator>
      <dc:date>2022-09-09T10:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612554#M212976</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for sharing your inputs and the SPL.&lt;/P&gt;&lt;P&gt;I tried to execute the below code but it does not fetch me any results.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup table1.csv 
| eval 
   orig_index=lower(index), 
   orig_host=lower(host), 
   orig_sourcetype=lower(sourcetype)
| eval searchq="index=idx1"." orig_index=".lower(index)." orig_sourcetype=".orig_sourcetype." orig_host=".orig_host
| search searchq&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to check the SPL that got formed and stored in the field: searchq, I used the below code: -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup table1.csv 
| eval 
   orig_index=lower(index), 
   orig_host=lower(host), 
   orig_sourcetype=lower(sourcetype)
| eval searchq="index=idx1"." orig_index=".lower(index)." orig_sourcetype=".orig_sourcetype." orig_host=".orig_host." |stats max(_time) AS last_seen BY orig_index, orig_sourcetype, orig_host |rename orig_* AS *"
| fields searchq&lt;/LI-CODE&gt;&lt;P&gt;The above code gave line by line SPL for each host and its corresponding sourcetype and index.&lt;/P&gt;&lt;P&gt;Thus, can you please share how to execute each SPL from the result and store the results in lookup table?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 11:14:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612554#M212976</guid>
      <dc:creator>Taruchit</dc:creator>
      <dc:date>2022-09-09T11:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612556#M212977</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for sharing your inputs.&lt;/P&gt;&lt;P&gt;In my scenario, the summary index: - idx1, has data for 100s of actual indexes. But, I need to have the lookup table updated with latest timestamp only for those hosts which are already stored in it.&lt;/P&gt;&lt;P&gt;The list of index values in lookup table is a subset of list of index values in the summary index.&lt;/P&gt;&lt;P&gt;The data in lookup table is not governed by me, thus, I do not have visibility towards the list of index values for which the hosts are stored in the table.&lt;/P&gt;&lt;P&gt;As the result, I will need to build a dynamic solution which takes index value, its corresponding sourcetype and host from the lookup table and then fetch max(_time) from summary index and then store it back in the lookup table.&lt;/P&gt;&lt;P&gt;Thus, please help by sharing your inputs.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 11:23:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612556#M212977</guid>
      <dc:creator>Taruchit</dc:creator>
      <dc:date>2022-09-09T11:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612558#M212978</link>
      <description>&lt;P&gt;Most likely you hit the stats command limit. This can be changed in limits.conf file. You may find this thread useful:&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Why-do-I-receive-quot-Limit-50000-results-reached-quot-Warning/m-p/105083" target="_blank"&gt;Solved: Why do I receive "Limit (50000 results) reached." ... - Splunk Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 11:29:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612558#M212978</guid>
      <dc:creator>JacekF</dc:creator>
      <dc:date>2022-09-09T11:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612565#M212980</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/223102"&gt;@Taruchit&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you search cannot run because after a stats command you have only the fields in stats, in your case searchq isn't one of them.&lt;/P&gt;&lt;P&gt;To use the last row, you have to add searchq to the stats command.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 12:31:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612565#M212980</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-09T12:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612570#M212981</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224955"&gt;@JacekF&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for inputs.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|inputlookup table1.csv&lt;/LI-CODE&gt;&lt;P&gt;The above SPL gives 50,653 records.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|inputlookup table1.csv
|stats count BY index, sourcetype, host&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;|inputlookup table1.csv
|stats values(last_seen) BY index, sourcetype, host&lt;/LI-CODE&gt;&lt;P&gt;The above two SPLs also gives 50,653 records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thus, if there was a restriction of 50,000 for stats command, I think in the second SPL, I should have got lesser results.&lt;/P&gt;&lt;P&gt;Please share if my understanding is correct or if any correction is needed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 12:44:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612570#M212981</guid>
      <dc:creator>Taruchit</dc:creator>
      <dc:date>2022-09-09T12:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612616#M212990</link>
      <description>&lt;P&gt;To update only selective rows in a CSV file, you'll need an external data management system such as a traditional DBMS. &amp;nbsp;It would be easier to base your lookup on that DBMS in that case.&lt;/P&gt;&lt;P&gt;However,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;In my scenario, the summary index: - idx1, has data for 100s of actual indexes. But, I need to have the lookup table updated with latest timestamp only for those hosts &lt;U&gt;&lt;EM&gt;which are already stored in it&lt;/EM&gt;&lt;/U&gt;.&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;I could be interpret the underlined part wrong. &amp;nbsp;But to me, that means that it contains all data that table1.csv needs. &amp;nbsp;Therefore, the following &lt;EM&gt;should&lt;/EM&gt; suffice:&lt;/P&gt;&lt;PRE&gt;| tstats max(_time) as last_seen where index=idx1 earliest=0 by orig_index orig_sourcetype orig_host
| rename origin_* as *
| outputlookup table1.csv&lt;/PRE&gt;&lt;P&gt;Have you tried it? &amp;nbsp;You can&amp;nbsp;try without outputlookup to assess performance. &amp;nbsp;You mentioned that you will run this at an interval of week or such. &amp;nbsp;This search shouldn't take very long nor is it very demanding even with fairly large idx1.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 17:01:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612616#M212990</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-09-09T17:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to search each value of a lookup table and update the corresponding column based on SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612683#M213019</link>
      <description>&lt;P&gt;You are reaching one of the Splunk limits defined in limits.conf. This is why you receive the total number of 50000 records.&amp;nbsp; I would suggest that you mark this thread as resolved, and open a new one regarding the limited number of rows in the result. This will, from one hand, allow others with the same problems as initial one in this thread, to find a solution, and from the other hand you will more likely find the answer to the limited results problem, as more people will take a look at it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 06:50:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-each-value-of-a-lookup-table-and-update-the/m-p/612683#M213019</guid>
      <dc:creator>JacekF</dc:creator>
      <dc:date>2022-09-12T06:50:20Z</dc:date>
    </item>
  </channel>
</rss>

