<?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: How to append two different tables with different time intervals into a single table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336767#M175271</link>
    <description>&lt;P&gt;@DalJeanis&lt;BR /&gt;
with increased data volume and with multiple fields, the initial part of the code "table _time Field1, Field2, Field3 makes the overall query to breach the search size limit, hence as an optimizing factor, by removing the part, still we get the same set of result. kindly let me know if this practice is allowed?&lt;/P&gt;</description>
    <pubDate>Fri, 31 Mar 2017 12:50:29 GMT</pubDate>
    <dc:creator>sundarrajan</dc:creator>
    <dc:date>2017-03-31T12:50:29Z</dc:date>
    <item>
      <title>How to append two different tables with different time intervals into a single table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336762#M175266</link>
      <description>&lt;P&gt;Hi all.&lt;BR /&gt;
Apologies for asking such an unclear and hazy question. I have a situation to show transactions in 2 different time references. The 1st part of the table where i am showing transaction at application level (APP name) with &lt;STRONG&gt;time &lt;EM&gt;bucket _time span=15m&lt;/EM&gt; ** and I also need to show what is the peak transaction count in last 1sec for the identified APP name. I tried **appendcols&lt;/STRONG&gt; and then had a separate search for peak value at &lt;STRONG&gt;bucket _time span=1s&lt;/STRONG&gt;. But when i downloaded the report I couldnt get the table structure clearly. The last column is going beyond the time column as per the primary search. &lt;BR /&gt;
So how to ensure, we get a peak value transaction as the later half despite showing value of count in a 15mins window?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 09:47:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336762#M175266</guid>
      <dc:creator>sundarrajan</dc:creator>
      <dc:date>2017-03-06T09:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to append two different tables with different time intervals into a single table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336763#M175267</link>
      <description>&lt;P&gt;Try this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search 
| table _time APP_name
| bin _time as bin1s span=1s 
| stats count as count1s by APP_name bin1s
| bin bin1s as bin15m span=15m
| stats sum(count1s) as count, max(count1s) as "peak second", by bin15m
| rename bin15m as _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All the bin renames of _time are not actually necessary, but I thought they would make the code less confusing to you.  The big concept here is, first bin and aggregate at the lower level, then select out the peak second when you are doing the higher-level aggregation.&lt;/P&gt;

&lt;P&gt;Here's the code without any renames...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search 
| table _time APP_name
| bin _time span=1s 
| stats count as count1s by APP_name _time 
| bin _time  span=15m
| stats sum(count1s) as count, max(count1s) as "peak second", by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Mar 2017 15:46:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336763#M175267</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-06T15:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to append two different tables with different time intervals into a single table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336764#M175268</link>
      <description>&lt;P&gt;Did this solve your issue, or do you still need help?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 02:58:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336764#M175268</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-14T02:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to append two different tables with different time intervals into a single table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336765#M175269</link>
      <description>&lt;P&gt;Dear DalJeanis,&lt;/P&gt;

&lt;P&gt;Thanks for the quick solution. It really works for me (2nd solution over 1st). Grouping by "bins" is not clearly working. Hence I preferred grouping by time. &lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 06:21:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336765#M175269</guid>
      <dc:creator>sundarrajan</dc:creator>
      <dc:date>2017-03-14T06:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to append two different tables with different time intervals into a single table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336766#M175270</link>
      <description>&lt;P&gt;Dear DalJeanis,&lt;BR /&gt;
Apologies for a delay in response. I tested the code, and it works well for me. Thanks for sharing the logic. &lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 06:22:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336766#M175270</guid>
      <dc:creator>sundarrajan</dc:creator>
      <dc:date>2017-03-14T06:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to append two different tables with different time intervals into a single table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336767#M175271</link>
      <description>&lt;P&gt;@DalJeanis&lt;BR /&gt;
with increased data volume and with multiple fields, the initial part of the code "table _time Field1, Field2, Field3 makes the overall query to breach the search size limit, hence as an optimizing factor, by removing the part, still we get the same set of result. kindly let me know if this practice is allowed?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 12:50:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-append-two-different-tables-with-different-time-intervals/m-p/336767#M175271</guid>
      <dc:creator>sundarrajan</dc:creator>
      <dc:date>2017-03-31T12:50:29Z</dc:date>
    </item>
  </channel>
</rss>

