<?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: Don't execute rest of commands if there is no events from base search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Don-t-execute-rest-of-commands-if-there-is-no-events-from-base/m-p/545401#M154473</link>
    <description>&lt;P&gt;Thanks Rich&lt;/P&gt;&lt;P&gt;Exactly what I'm needing, but unfortunately our Client have still version 7.3.x &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
    <pubDate>Thu, 25 Mar 2021 13:54:52 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2021-03-25T13:54:52Z</dc:date>
    <item>
      <title>Don't execute rest of commands if there is no events from base search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Don-t-execute-rest-of-commands-if-there-is-no-events-from-base/m-p/545306#M154430</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Our client have the next (kind of query) runs as a schedule. It can found events or not, based on current situation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base search&amp;gt;
| where isnotnull(joblist)
| dedup joblist
| map search="| dbxquery connection=con_A query=\"select a, b, c from xx where x='AAA'\" |appendcols [| dbxquery connection=con_A query=\"select (select max([rows]) from sys.partitions with (nolock) where object_id=object_id('dbo.$joblist$')) as rowCnt,sum(len(cast(xmlrecord as varchar(max)))) as sum from $joblist$ (nolock)\"]"
| &amp;lt;rest of query&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works find where the base query found events and joblist is defined. BUT when &amp;nbsp;base search cannot find any events, then the query/schedule will fail with error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error in 'map': Did not find value for required attribute 'joblist'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have tried to&amp;nbsp;found answers, but&amp;nbsp;couldn't &amp;nbsp;found / get ideas how to skip&amp;nbsp;the rest of query, starting from map, if there is no event. Any helps / ideas appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-where-if-a-specific-value-for-FIELD1-is/m-p/146634" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-where-if-a-specific-value-for-FIELD1-is/m-p/146634&lt;/A&gt;&amp;nbsp;This&amp;nbsp;didn't work and&amp;nbsp;not those where have&amp;nbsp;proposed to use fillnull.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;r. Ismo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 09:26:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Don-t-execute-rest-of-commands-if-there-is-no-events-from-base/m-p/545306#M154430</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-03-25T09:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Don't execute rest of commands if there is no events from base search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Don-t-execute-rest-of-commands-if-there-is-no-events-from-base/m-p/545387#M154467</link>
      <description>&lt;P&gt;Check out the new &lt;FONT face="courier new,courier"&gt;require&lt;/FONT&gt; command.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 13:23:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Don-t-execute-rest-of-commands-if-there-is-no-events-from-base/m-p/545387#M154467</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-25T13:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Don't execute rest of commands if there is no events from base search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Don-t-execute-rest-of-commands-if-there-is-no-events-from-base/m-p/545401#M154473</link>
      <description>&lt;P&gt;Thanks Rich&lt;/P&gt;&lt;P&gt;Exactly what I'm needing, but unfortunately our Client have still version 7.3.x &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 13:54:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Don-t-execute-rest-of-commands-if-there-is-no-events-from-base/m-p/545401#M154473</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-03-25T13:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Don't execute rest of commands if there is no events from base search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Don-t-execute-rest-of-commands-if-there-is-no-events-from-base/m-p/547708#M155322</link>
      <description>I accept Rich's answer as a solution, but still waiting if someone can point me a right direction with older splunk versions.</description>
      <pubDate>Tue, 13 Apr 2021 05:25:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Don-t-execute-rest-of-commands-if-there-is-no-events-from-base/m-p/547708#M155322</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-04-13T05:25:02Z</dc:date>
    </item>
  </channel>
</rss>

