<?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 How to add delay between two commands in search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288083#M165092</link>
    <description>&lt;P&gt;Hi, How can I add delay between two commands in Splunk.&lt;BR /&gt;
I have a scenario,&lt;BR /&gt;
1)  where I will append the search results to existing lookup file, &lt;BR /&gt;
2) in second step I need to retrieve complete results and perform lookup activities search results in this step&lt;/P&gt;

&lt;P&gt;If I use in single query, I am worried that before exporting results to lookup file the second query may execute. SO thinking to add delay between to commands&lt;/P&gt;

&lt;P&gt;Simply:&lt;BR /&gt;
After using |outputlookup command to export results to file, I need to use lookup command to map latest results in file to specific search results. But worries if lookup command executes parallel with outputlookup command, Which will happed incomplete result mapping&lt;/P&gt;

&lt;P&gt;Is it possible?&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2017 18:08:27 GMT</pubDate>
    <dc:creator>ankithreddy777</dc:creator>
    <dc:date>2017-11-16T18:08:27Z</dc:date>
    <item>
      <title>How to add delay between two commands in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288083#M165092</link>
      <description>&lt;P&gt;Hi, How can I add delay between two commands in Splunk.&lt;BR /&gt;
I have a scenario,&lt;BR /&gt;
1)  where I will append the search results to existing lookup file, &lt;BR /&gt;
2) in second step I need to retrieve complete results and perform lookup activities search results in this step&lt;/P&gt;

&lt;P&gt;If I use in single query, I am worried that before exporting results to lookup file the second query may execute. SO thinking to add delay between to commands&lt;/P&gt;

&lt;P&gt;Simply:&lt;BR /&gt;
After using |outputlookup command to export results to file, I need to use lookup command to map latest results in file to specific search results. But worries if lookup command executes parallel with outputlookup command, Which will happed incomplete result mapping&lt;/P&gt;

&lt;P&gt;Is it possible?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 18:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288083#M165092</guid>
      <dc:creator>ankithreddy777</dc:creator>
      <dc:date>2017-11-16T18:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to add delay between two commands in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288084#M165093</link>
      <description>&lt;P&gt;Hi  ankithreddy777,&lt;BR /&gt;
could you share more details?&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 18:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288084#M165093</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-11-16T18:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to add delay between two commands in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288085#M165094</link>
      <description>&lt;P&gt;Commands on a single query are executed in the sequence they appear in the SPL. The next processing step in the search is not started until the previous step has completed. &lt;BR /&gt;
So, if you do &lt;CODE&gt;somesearch | outputlookup blah | someothercommand that uses the lookup&lt;/CODE&gt;, someothercommand will not start until the outputlookup has returned/completed. &lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 18:30:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288085#M165094</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-11-16T18:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to add delay between two commands in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288086#M165095</link>
      <description>&lt;P&gt;Hi ssievert,&lt;BR /&gt;
Thank you for the response. Does this apply to sub searches also. &lt;BR /&gt;
I thought sub-search part of |append command executes parallel with main search. I am right?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 21:52:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288086#M165095</guid>
      <dc:creator>ankithreddy777</dc:creator>
      <dc:date>2017-11-16T21:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to add delay between two commands in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288087#M165096</link>
      <description>&lt;P&gt;Hi ankithreddy777,&lt;/P&gt;

&lt;P&gt;not sure if the question is still relevant, but as I had a similar issue ( I think) I will share my solution.&lt;/P&gt;

&lt;P&gt;If I interpret your question correctly, you have something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search ... | processing ... 
| outputlookup append=true file_1.csv 
| append 
    [ inputlookup file_1.csv | lookup ... | processing and merging... ]
| final processing or outputlookup
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If this is your szenario, then your first outputlookup will have the results of your initial search appended correctly, BUT the inputlookup file_1.csv in the append section is subsearch and will get parsed and dispatched before your outer search, so it will take the version of file_1.csv before the results from your search have been appended.&lt;BR /&gt;
The append command appends the results of a subsearch to the current results. &lt;/P&gt;

&lt;P&gt;To solve this, you can just replace append by appendpipe.&lt;BR /&gt;
This appends the result of the subpipeline to the search results. Unlike a subsearch, the subpipeline is not run first. The subpipeline is run when the search reaches the appendpipe command. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:25:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-delay-between-two-commands-in-search/m-p/288087#M165096</guid>
      <dc:creator>flle</dc:creator>
      <dc:date>2020-09-29T17:25:30Z</dc:date>
    </item>
  </channel>
</rss>

