<?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 Splitting event by column in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112724#M29620</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;At search time, is there any way of splitting a tabular event into multiple events by column rather than row as multikv does.&lt;BR /&gt;
For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;node                       node0     node1
numa_hit              1021798456    123456
numa_miss                      0        10
numa_foreign                   0         0
interleave_hit             14348       123
local_node            1021798456    123446
other_node                     0         0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like this to be split into two events - one per node so I can do things like:&lt;BR /&gt;
stats max(numa_miss) by node&lt;/P&gt;

&lt;P&gt;There could be many tens of columns so using "rex" isn't really an option.&lt;/P&gt;</description>
    <pubDate>Mon, 31 Mar 2014 10:39:49 GMT</pubDate>
    <dc:creator>davewood</dc:creator>
    <dc:date>2014-03-31T10:39:49Z</dc:date>
    <item>
      <title>Splitting event by column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112724#M29620</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;At search time, is there any way of splitting a tabular event into multiple events by column rather than row as multikv does.&lt;BR /&gt;
For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;node                       node0     node1
numa_hit              1021798456    123456
numa_miss                      0        10
numa_foreign                   0         0
interleave_hit             14348       123
local_node            1021798456    123446
other_node                     0         0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like this to be split into two events - one per node so I can do things like:&lt;BR /&gt;
stats max(numa_miss) by node&lt;/P&gt;

&lt;P&gt;There could be many tens of columns so using "rex" isn't really an option.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2014 10:39:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112724#M29620</guid>
      <dc:creator>davewood</dc:creator>
      <dc:date>2014-03-31T10:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting event by column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112725#M29621</link>
      <description>&lt;P&gt;Hi davewood,&lt;/P&gt;

&lt;P&gt;have a look at &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/SearchReference/Transpose"&gt;transpose&lt;/A&gt;, this will return the specified number of rows (search results) as columns which can be used for further Splunk searches.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2014 10:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112725#M29621</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-03-31T10:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting event by column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112726#M29622</link>
      <description>&lt;P&gt;You could do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | multikv | where node="numa_miss" | stats max(node*) by node
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will generate this for your sample event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    node        max(node0)   max(node1)
1   numa_miss            0           10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It's not quite what a &lt;CODE&gt;stats max(numa_miss)&lt;/CODE&gt; would produce, but it might work for you.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2014 11:29:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112726#M29622</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-31T11:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting event by column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112727#M29623</link>
      <description>&lt;P&gt;Thanks. Yes, I took a look at transpose but there was a bit too much subsequent tidying of data required for my purposes.&lt;BR /&gt;
I ended up changing the script wrapper to reformat the output. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2014 12:59:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112727#M29623</guid>
      <dc:creator>davewood</dc:creator>
      <dc:date>2014-04-01T12:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting event by column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112728#M29624</link>
      <description>&lt;P&gt;Thanks. That's actually pretty close to what I need. If it was just one report I think I'd just live with it, but because I have quite a few reports to base on this data, I ended up changing the script wrapper to reformat the output though.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2014 13:02:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112728#M29624</guid>
      <dc:creator>davewood</dc:creator>
      <dc:date>2014-04-01T13:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting event by column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112729#M29625</link>
      <description>&lt;P&gt;Reformatting the output is the best choice, especially if the number of nodes were to grow. Having a thousand rows is easy to handle, a thousand columns are annoying though.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2014 13:22:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splitting-event-by-column/m-p/112729#M29625</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-01T13:22:55Z</dc:date>
    </item>
  </channel>
</rss>

