<?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 &amp;quot;search base=X&amp;quot; not working with append in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394708#M114629</link>
    <description>&lt;P&gt;I am using the "search base=X" approach to generate stats.&lt;/P&gt;

&lt;P&gt;When I try to run two searches using append (or join etc) I am only getting stats from the first listed query, even if I  change the order of their order.   I can run the queries in separate panels and get results so am confident that the issue isn't with the searches themselves.&lt;BR /&gt;
Multiple  cannot be used in the same panel (I have tried loadjob without success).&lt;/P&gt;

&lt;P&gt;Many thanks for any pointers / tricks I have missed in getting "search base=X" and append to work together&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jan 2019 12:29:55 GMT</pubDate>
    <dc:creator>ChrisCLewis</dc:creator>
    <dc:date>2019-01-09T12:29:55Z</dc:date>
    <item>
      <title>"search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394708#M114629</link>
      <description>&lt;P&gt;I am using the "search base=X" approach to generate stats.&lt;/P&gt;

&lt;P&gt;When I try to run two searches using append (or join etc) I am only getting stats from the first listed query, even if I  change the order of their order.   I can run the queries in separate panels and get results so am confident that the issue isn't with the searches themselves.&lt;BR /&gt;
Multiple  cannot be used in the same panel (I have tried loadjob without success).&lt;/P&gt;

&lt;P&gt;Many thanks for any pointers / tricks I have missed in getting "search base=X" and append to work together&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 12:29:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394708#M114629</guid>
      <dc:creator>ChrisCLewis</dc:creator>
      <dc:date>2019-01-09T12:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394709#M114630</link>
      <description>&lt;P&gt;@ChrisCLewis, &lt;BR /&gt;
- Do you have a common field in both search which is used in the stats grouping? If not , rename one of them. &lt;BR /&gt;
- If there are null values in the group by field, fillnull them with a value.&lt;/P&gt;

&lt;P&gt;Please provide the search you are using if possible after masking any confidential data.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 12:38:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394709#M114630</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-01-09T12:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394710#M114631</link>
      <description>&lt;P&gt;Many thanks for the speedy reply.&lt;BR /&gt;
All field names are "in common" and have just updated with fillnull - unfortunately still only getting the results from the first query.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 12:48:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394710#M114631</guid>
      <dc:creator>ChrisCLewis</dc:creator>
      <dc:date>2019-01-09T12:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394711#M114632</link>
      <description>&lt;P&gt;Do you mind sharing the search you are currently using with append? &lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 13:02:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394711#M114632</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-01-09T13:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394712#M114633</link>
      <description>&lt;P&gt;This is the append query, I originally tried it with |table instead of |fields but makes no difference.&lt;/P&gt;

&lt;P&gt;|search Q IN ("AB", "CD") | stats count  as number by month | fillnull value="0" created code description month uniques comment number volume&lt;BR /&gt;
     | eval code = "Q1"&lt;BR /&gt;
     | eval created = strftime(time(), "%Y-%m-%d %H:%M")&lt;BR /&gt;
     | eval description = "All about Q"&lt;BR /&gt;
     | fields created code description month uniques comment number volume&lt;BR /&gt;
 |append &lt;BR /&gt;
    [|search Q IN ("EF", "GH")&lt;BR /&gt;&lt;BR /&gt;
     | makemv delim=";" mvfield | mvexpand mvfield &lt;BR /&gt;
     | eval check = mvfield &lt;BR /&gt;
     | lookup some.csv check OUTPUT check as check_csv &lt;BR /&gt;
     | where check like check_csv&lt;BR /&gt;
     | stats count  as number by month | fillnull value="0" created code description month uniques comment number volume&lt;BR /&gt;
     | eval code = "R1"&lt;BR /&gt;
     | eval created = strftime(time(), "%Y-%m-%d %H:%M")&lt;BR /&gt;
     | eval description = "all about the R" &lt;BR /&gt;
     | fields created code description month uniques comment number volume  ]&lt;BR /&gt;
     |table created code description month uniques comment number volume&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:43:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394712#M114633</guid>
      <dc:creator>ChrisCLewis</dc:creator>
      <dc:date>2020-09-29T22:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394713#M114634</link>
      <description>&lt;P&gt;Alright. So there is no grouping at the end of the search by combining both results. so initial questions are invalidated and fillnull will not help.&lt;BR /&gt;
By looking at the search only - &lt;CODE&gt;created, code, description, month, number&lt;/CODE&gt; are the fields available in the output.&lt;BR /&gt;
You had already mentioned that the searches are executing fine when run separately. Are these searches using same time range? Is that from time token or explicitly mentioned in the search using earliest &amp;amp; latest?&lt;/P&gt;

&lt;P&gt;Just for testing, would you mind running the below search and check if you are able to see the dummy values ? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|search Q IN ("AB", "CD") | stats count as number by month
| eval code = "Q1"
| eval created = strftime(time(), "%Y-%m-%d %H:%M")
| eval description = "All about Q"
| fields created code description month uniques comment number volume
|append 
[|makeresults|eval created="dummy",code="Dummy",description="Dummy",month="Dummy",number="Dummy"|fields - _time]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Jan 2019 13:23:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394713#M114634</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-01-09T13:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394714#M114635</link>
      <description>&lt;P&gt;The time frame is defined in the base search, currently a token but have also used explicit range too.&lt;/P&gt;

&lt;P&gt;The dummy values do appear with the |makeresults.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 13:32:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394714#M114635</guid>
      <dc:creator>ChrisCLewis</dc:creator>
      <dc:date>2019-01-09T13:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394715#M114636</link>
      <description>&lt;P&gt;Thanks Chris. Can we just run this as well and see the dummy value under field &lt;CODE&gt;second&lt;/CODE&gt; appears in some of the events&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|search Q IN ("AB", "CD") | stats count as number by month 
| eval code = "Q1"
| eval created = strftime(time(), "%Y-%m-%d %H:%M")
| eval description = "All about Q"
| fields created code description month number
|append 
[|search Q IN ("EF", "GH") 
| makemv delim=";" mvfield | mvexpand mvfield 
| eval check = mvfield 
| lookup some.csv check OUTPUT check as check_csv 
| where check like check_csv
| stats count as number by month 
| eval code = "R1"
| eval created = strftime(time(), "%Y-%m-%d %H:%M")
| eval description = "all about the R" 
| fields created code description month number|eval second="Dummy" ]
|table created code description month number,second
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Jan 2019 13:45:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394715#M114636</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-01-09T13:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394716#M114637</link>
      <description>&lt;P&gt;Just run now and only results for Q are shown, nothing for R (including "second")&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 14:09:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394716#M114637</guid>
      <dc:creator>ChrisCLewis</dc:creator>
      <dc:date>2019-01-09T14:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394717#M114638</link>
      <description>&lt;P&gt;Chris, its bit strange. &lt;BR /&gt;
Are you really getting results for exactly same search if they are running separately? Also did the appended search run in search window and not in a dashboard?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 05:50:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394717#M114638</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-01-10T05:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394718#M114639</link>
      <description>&lt;P&gt;Good morning, &lt;BR /&gt;
yes - getting exactly the same results when running separately - all I did was to copy the queries to a new dashboard and add in the append element.&lt;/P&gt;

&lt;P&gt;The original searches worked whilst appended in search - the base search does a lot of work which means the queries are now greatly shortened and use different field names etc so they only work with the base search.&lt;/P&gt;

&lt;P&gt;It is very odd, I've used append a lot but first time using base search &lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 09:42:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394718#M114639</guid>
      <dc:creator>ChrisCLewis</dc:creator>
      <dc:date>2019-01-10T09:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: "search base=X" not working with append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394719#M114640</link>
      <description>&lt;P&gt;Ok, so you are running it in a dashboard. What if you run the entire search with append in a search window? &lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 10:00:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-search-base-X-quot-not-working-with-append/m-p/394719#M114640</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-01-10T10:00:51Z</dc:date>
    </item>
  </channel>
</rss>

