<?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: Transpose CSV column headers to row in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270673#M51972</link>
    <description>&lt;P&gt;Not sure I get it completely. If you're desired out is what you need, then give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | untable percentile type value | sort 0 type percentile value | table type percentile value
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 25 Jul 2016 18:25:32 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-07-25T18:25:32Z</dc:date>
    <item>
      <title>Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270666#M51965</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Is Splunk able to, before or after indexing, transpose column and rows in this way: &lt;BR /&gt;
original file: has column headers&lt;BR /&gt;
need format: each column header to be appended into a column such that each header is repeated as a row corresponding to a value.&lt;/P&gt;

&lt;P&gt;Please see the initial and final screen shot attached. Thank you.&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/1610iAB62C416CF5DD547/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;&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/1611i18BA29E5E4C643FC/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>Mon, 25 Jul 2016 16:04:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270666#M51965</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-25T16:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270667#M51966</link>
      <description>&lt;P&gt;I know splunk can transpose, but from my experience you have to mess with the column/row names a bit to get it pretty. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | transpose 5
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are some examples here it the documentation. &lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transpose"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transpose&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 16:42:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270667#M51966</guid>
      <dc:creator>JDukeSplunk</dc:creator>
      <dc:date>2016-07-25T16:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270668#M51967</link>
      <description>&lt;P&gt;This should do it&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | untable percentile type value | table type percentile value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See more on untable command here. &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Untable"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Untable&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 16:58:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270668#M51967</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-25T16:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270669#M51968</link>
      <description>&lt;P&gt;I need to untable multiple columns, and have the "type" duplicated and corresponding to each value. Leave the percentile however, but in this case the value would need to be duplicated to correspond to each set of "type." Does that make sense? &lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 17:35:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270669#M51968</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-25T17:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270670#M51969</link>
      <description>&lt;P&gt;This does not look correct on my end. I need to append all of the headers are rows with corresponding values (of which there are multiple values, for the "type" would be duplicated).&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 17:43:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270670#M51969</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-25T17:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270671#M51970</link>
      <description>&lt;P&gt;How about this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | stats first(*) as * by type percentile
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jul 2016 17:54:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270671#M51970</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-25T17:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270672#M51971</link>
      <description>&lt;P&gt;Hm, did not seem to produce any results.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 18:19:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270672#M51971</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-25T18:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270673#M51972</link>
      <description>&lt;P&gt;Not sure I get it completely. If you're desired out is what you need, then give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | untable percentile type value | sort 0 type percentile value | table type percentile value
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jul 2016 18:25:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270673#M51972</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-25T18:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270674#M51973</link>
      <description>&lt;P&gt;This is getting closer. &lt;BR /&gt;
Let me try one more time.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Sample original file:&lt;/STRONG&gt;&lt;BR /&gt;
percentile    login      logout     search_result&lt;BR /&gt;
1                    686        13332       13128&lt;BR /&gt;
2                    687        13333       13129&lt;BR /&gt;
4                    686        13340       13127&lt;BR /&gt;
8                    688        13330       13128&lt;BR /&gt;
9                    690        13331       13126&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Desired result after transpose:&lt;/STRONG&gt; &lt;BR /&gt;
type                    percentile          value&lt;BR /&gt;
login                   1                          686&lt;BR /&gt;&lt;BR /&gt;
login                   2                          687&lt;BR /&gt;&lt;BR /&gt;
login                   4                          686&lt;BR /&gt;&lt;BR /&gt;
login                   8                          688&lt;BR /&gt;&lt;BR /&gt;
login                   9                          690&lt;BR /&gt;&lt;BR /&gt;
logout                1                          13332&lt;BR /&gt;&lt;BR /&gt;
logout                2                          13333&lt;BR /&gt;&lt;BR /&gt;
logout                4                          13340&lt;BR /&gt;&lt;BR /&gt;
logout                8                          13330&lt;BR /&gt;&lt;BR /&gt;
logout                9                          13331&lt;BR /&gt;&lt;BR /&gt;
search_result    1                         13128&lt;BR /&gt;
search_result    2                         13129&lt;BR /&gt;
search_result    4                         13127&lt;BR /&gt;
search_result    8                         13128&lt;BR /&gt;
search_result    9                         13126 &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:18:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270674#M51973</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2020-09-29T10:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270675#M51974</link>
      <description>&lt;P&gt;I tested with your new sample data and the query returns the desired result.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 19:58:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270675#M51974</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-25T19:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose CSV column headers to row</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270676#M51975</link>
      <description>&lt;P&gt;Just add this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | table percentiles login logout search_result | untable percentiles TYPE duration
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jul 2016 23:39:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transpose-CSV-column-headers-to-row/m-p/270676#M51975</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-27T23:39:52Z</dc:date>
    </item>
  </channel>
</rss>

