<?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 add a row into table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165210#M46935</link>
    <description>&lt;P&gt;BTW, this solution deliberately does NOT put your main search as the &lt;CODE&gt;subsearch&lt;/CODE&gt; in the &lt;CODE&gt;append&lt;/CODE&gt; command because this imposes &lt;CODE&gt;subsearch&lt;/CODE&gt; limits on your search.  Beware of any answers that subsearches your main search.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2015 14:37:01 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-08-11T14:37:01Z</dc:date>
    <item>
      <title>How to add a row into table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165204#M46929</link>
      <description>&lt;P&gt;How can I add a row into a table either manually or through a look-up table? I would like to insert the row right below the column headers, and will use them to include descriptions of each column. &lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2015 21:35:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165204#M46929</guid>
      <dc:creator>jyamie</dc:creator>
      <dc:date>2015-08-10T21:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a row into table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165205#M46930</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | append [ | noop | stats count AS desc1 | eval _time=now() + 1 |  eval desc1="This describes field 1" | eval desc2="This describes field2" ] | sort 0 - _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or you can swap all the &lt;CODE&gt;_time&lt;/CODE&gt; stuff with a bookend of leading and trailing &lt;CODE&gt;| reverse&lt;/CODE&gt; commands to put your appended row on top.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2015 21:41:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165205#M46930</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-10T21:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a row into table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165206#M46931</link>
      <description>&lt;P&gt;There are two ways you can achieve this&lt;/P&gt;

&lt;P&gt;1) Manually providing the description of columns in the search&lt;BR /&gt;
Assuming, your output columns names are col1, col2 and col3 and appear in the output in same order. So try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval col1="Description of col1" | eval col2="Description of col2" | eval col3="Description of col3" | table col1 col2 col3| append [ Your current search providing results with columns col1 col2 col3] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2) Using a lookup to add description&lt;BR /&gt;
Assuming you've a lookup table file named FieldDescription.csv with two fields as 'field' and 'desc' try this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your current search providing results with columns col1 col2 col3 | eval sortcolumn=1| appendpipe [| stats first(*) as * | transpose | lookup FieldDescription.csv field as column OUTPUT desc | xyseries "row 1" column desc | fields - "row 1" | eval sortcolumn=0 ] | sort sortcolumn | fields - sortcolumn
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Aug 2015 22:41:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165206#M46931</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-08-10T22:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a row into table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165207#M46932</link>
      <description>&lt;P&gt;thanks, i haven't tried the lookup yet, but manually providing the descriptions worked great! &lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 14:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165207#M46932</guid>
      <dc:creator>jyamie</dc:creator>
      <dc:date>2015-08-11T14:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a row into table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165208#M46933</link>
      <description>&lt;P&gt;when i do the lookup method, i get each description taking up its own row, so i end up with a layer of many rows. how can i merge them together? i followed your lookup query exactly&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 14:32:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165208#M46933</guid>
      <dc:creator>jyamie</dc:creator>
      <dc:date>2015-08-11T14:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a row into table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165209#M46934</link>
      <description>&lt;P&gt;i do have some empty cells, which may be why, in my lookup table&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 14:33:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165209#M46934</guid>
      <dc:creator>jyamie</dc:creator>
      <dc:date>2015-08-11T14:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a row into table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165210#M46935</link>
      <description>&lt;P&gt;BTW, this solution deliberately does NOT put your main search as the &lt;CODE&gt;subsearch&lt;/CODE&gt; in the &lt;CODE&gt;append&lt;/CODE&gt; command because this imposes &lt;CODE&gt;subsearch&lt;/CODE&gt; limits on your search.  Beware of any answers that subsearches your main search.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 14:37:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-row-into-table/m-p/165210#M46935</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-11T14:37:01Z</dc:date>
    </item>
  </channel>
</rss>

