<?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 only append the event based on the existing records from the main search. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-only-append-the-event-based-on-the-existing-records-from/m-p/428443#M122584</link>
    <description>&lt;P&gt;Hi.&lt;/P&gt;

&lt;P&gt;i have a search which need to combine fields from two index. i know i can use "Join" but it is too costly thats why i start looking into the "Append" command.&lt;/P&gt;

&lt;P&gt;The question is i found i have to enter the field value in the "append search" to get the correct final table, if i dont put the value in the append search, this field will missing in the final table. Below i have attached some of the code.&lt;/P&gt;

&lt;P&gt;index=year* Code=12 OR Code=13 &lt;STRONG&gt;Number=12345678&lt;/STRONG&gt;&lt;BR /&gt;
| rex ****************&lt;BR /&gt;
| rex ****************&lt;BR /&gt;
| eval *******************&lt;BR /&gt;
| eval 001=xxxxx&lt;BR /&gt;
| append &lt;BR /&gt;
  [search index=month* Word=xys OR word=ayd &lt;STRONG&gt;Number=12345678&lt;/STRONG&gt;| fields + day week time]&lt;BR /&gt;
| rex ****************&lt;BR /&gt;
| rex ****************&lt;BR /&gt;
| eval *******************&lt;BR /&gt;
| eval 002=xxxxxxx&lt;BR /&gt;
| stats&lt;BR /&gt;
first(001) as 001&lt;BR /&gt;
first(002) as 002&lt;BR /&gt;
by Number&lt;BR /&gt;
|table 001 002&lt;/P&gt;

&lt;P&gt;The code above works find but once i remove the &lt;STRONG&gt;Number=12345678&lt;/STRONG&gt; in the append search, the 002 field which is from the Append search cannot show in the table, and all the remaining events in index=month* will show in the table. is it possible to solve this? thanks a lot!!&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jan 2019 09:30:06 GMT</pubDate>
    <dc:creator>xzywind</dc:creator>
    <dc:date>2019-01-25T09:30:06Z</dc:date>
    <item>
      <title>How to only append the event based on the existing records from the main search.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-only-append-the-event-based-on-the-existing-records-from/m-p/428443#M122584</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;

&lt;P&gt;i have a search which need to combine fields from two index. i know i can use "Join" but it is too costly thats why i start looking into the "Append" command.&lt;/P&gt;

&lt;P&gt;The question is i found i have to enter the field value in the "append search" to get the correct final table, if i dont put the value in the append search, this field will missing in the final table. Below i have attached some of the code.&lt;/P&gt;

&lt;P&gt;index=year* Code=12 OR Code=13 &lt;STRONG&gt;Number=12345678&lt;/STRONG&gt;&lt;BR /&gt;
| rex ****************&lt;BR /&gt;
| rex ****************&lt;BR /&gt;
| eval *******************&lt;BR /&gt;
| eval 001=xxxxx&lt;BR /&gt;
| append &lt;BR /&gt;
  [search index=month* Word=xys OR word=ayd &lt;STRONG&gt;Number=12345678&lt;/STRONG&gt;| fields + day week time]&lt;BR /&gt;
| rex ****************&lt;BR /&gt;
| rex ****************&lt;BR /&gt;
| eval *******************&lt;BR /&gt;
| eval 002=xxxxxxx&lt;BR /&gt;
| stats&lt;BR /&gt;
first(001) as 001&lt;BR /&gt;
first(002) as 002&lt;BR /&gt;
by Number&lt;BR /&gt;
|table 001 002&lt;/P&gt;

&lt;P&gt;The code above works find but once i remove the &lt;STRONG&gt;Number=12345678&lt;/STRONG&gt; in the append search, the 002 field which is from the Append search cannot show in the table, and all the remaining events in index=month* will show in the table. is it possible to solve this? thanks a lot!!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 09:30:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-only-append-the-event-based-on-the-existing-records-from/m-p/428443#M122584</guid>
      <dc:creator>xzywind</dc:creator>
      <dc:date>2019-01-25T09:30:06Z</dc:date>
    </item>
  </channel>
</rss>

