<?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: Merging two data sources in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Merging-two-data-sources/m-p/458958#M129607</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
try something like below,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=a | table CommonIndex host Max | append [|search index=b | table CommonIndex host Max]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if fields are common in two indexes. you can try something like below,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=a OR index=b | table CommonIndex host Max
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 27 Jul 2018 12:57:35 GMT</pubDate>
    <dc:creator>thambisetty</dc:creator>
    <dc:date>2018-07-27T12:57:35Z</dc:date>
    <item>
      <title>Merging two data sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-two-data-sources/m-p/458957#M129606</link>
      <description>&lt;P&gt;Hi..&lt;/P&gt;

&lt;P&gt;Need some help in merging two search result.&lt;/P&gt;

&lt;P&gt;i have one source with below result as such -&lt;/P&gt;

&lt;P&gt;CommonIndex              host                              Max&lt;BR /&gt;
WinUnix                     appdcos                               23.10&lt;BR /&gt;
WinUnix                       hpmail                              91.80&lt;/P&gt;

&lt;P&gt;Another search result with output as such -&lt;/P&gt;

&lt;P&gt;CommonIndex             host                                              Max&lt;BR /&gt;
WinUnix                            ADDS                                          20.25&lt;BR /&gt;
WinUnix                           BCMP                                           75.16&lt;/P&gt;

&lt;P&gt;How can i reproduce the results like below in a single table. I have tried join,append but output is not correct.&lt;/P&gt;

&lt;P&gt;CommonIndex             host                                              Max&lt;BR /&gt;
WinUnix                             appdcos                                       23.10&lt;BR /&gt;
WinUnix                             hpmail                                           91.80&lt;BR /&gt;
WinUnix                            ADDS                                          20.25&lt;BR /&gt;
WinUnix                           BCMP                                           75.16&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 12:29:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-two-data-sources/m-p/458957#M129606</guid>
      <dc:creator>keishamtcs</dc:creator>
      <dc:date>2018-07-27T12:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two data sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-two-data-sources/m-p/458958#M129607</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
try something like below,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=a | table CommonIndex host Max | append [|search index=b | table CommonIndex host Max]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if fields are common in two indexes. you can try something like below,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=a OR index=b | table CommonIndex host Max
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 12:57:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-two-data-sources/m-p/458958#M129607</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2018-07-27T12:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two data sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-two-data-sources/m-p/458959#M129608</link>
      <description>&lt;P&gt;It would help to see your two searches, but the general way to do it is to merge the two queries.  You shouldn't need to use &lt;CODE&gt;append&lt;/CODE&gt; or &lt;CODE&gt;join&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=index1 sourcetype=st1) OR (index=index1 sourcetype=st2) | ... | table ComminIndex host Max
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 12:57:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-two-data-sources/m-p/458959#M129608</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-07-27T12:57:49Z</dc:date>
    </item>
  </channel>
</rss>

