<?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: Dynamic table - Create three tables in one in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245659#M73220</link>
    <description>&lt;P&gt;Thanks, don't forget to vote&lt;/P&gt;</description>
    <pubDate>Sat, 12 Mar 2016 17:54:23 GMT</pubDate>
    <dc:creator>gyslainlatsa</dc:creator>
    <dc:date>2016-03-12T17:54:23Z</dc:date>
    <item>
      <title>Dynamic table - Create three tables in one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245655#M73216</link>
      <description>&lt;P&gt;Hi, I have three reports, each with a different index.&lt;BR /&gt;
And I wanted to join them in the same table.&lt;BR /&gt;
Example:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1131i16D2E5D3D3FCE97F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I have tables A, B and C.&lt;BR /&gt;
I wanted to have only one table with four fields: time, K1, K2 and K3.&lt;BR /&gt;
But, each table is a search for a different index.&lt;/P&gt;

&lt;P&gt;Grateful!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 19:03:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245655#M73216</guid>
      <dc:creator>renanprado96</dc:creator>
      <dc:date>2016-03-10T19:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table - Create three tables in one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245656#M73217</link>
      <description>&lt;P&gt;Depending upon your current queries for each table, there may be different options, so Please provide your current queries. Possible options for you would be to use &lt;CODE&gt;appendcols&lt;/CODE&gt; OR &lt;CODE&gt;join&lt;/CODE&gt;  OR &lt;CODE&gt;append-stats&lt;/CODE&gt; combination OR (recommended way if possible) merge all three query in one base search (others involves sub searches).&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 19:36:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245656#M73217</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-10T19:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table - Create three tables in one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245657#M73218</link>
      <description>&lt;P&gt;hi,&lt;BR /&gt;
 try using &lt;CODE&gt;appendcols&lt;/CODE&gt; &lt;CODE&gt;(reassures you that the query contains a field that is common to the three indexes)&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   index=index1 | your search1
        |appendcols [search index=index2 | your search2] 
        |appendcols [search index=index3 | your search3 ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;see this example with &lt;CODE&gt;appendcols&lt;/CODE&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal |stats count as K1 by _time 
|appendcols [search index=_audit |stats count as K2 by _time] 
|appendcols [search index="_introspection" |stats count as K3 by _time ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that is the result&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1130iB9647CBDC52B8EAB/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 20:08:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245657#M73218</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2016-03-10T20:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table - Create three tables in one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245658#M73219</link>
      <description>&lt;P&gt;If your base searches are simple event searches with no pipes, you won't need any append/appendcols or anything that actually joins separate searches.    Here is the sort of thing that would achieve this in one search. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=A &amp;lt;searchTerms for A&amp;gt; ) OR ( index=B &amp;lt;searchTerms for B&amp;gt; ) OR (index=C &amp;lt;searchTerms for C&amp;gt; )| timechart span=7d avg(K1) avg(K2) avg(K3)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If one or more of your searches actually contain other search commands, and those commands cannot be safely run (or be tweaked to safely run) on the other two searches output rows,  that's the sort of use case where you actually do need append/appendcols/join etc. &lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 20:28:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245658#M73219</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2016-03-10T20:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table - Create three tables in one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245659#M73220</link>
      <description>&lt;P&gt;Thanks, don't forget to vote&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2016 17:54:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-table-Create-three-tables-in-one/m-p/245659#M73220</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2016-03-12T17:54:23Z</dc:date>
    </item>
  </channel>
</rss>

