<?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: Can you help me output field name, value from stats table to CSV? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-output-field-name-value-from-stats-table-to-CSV/m-p/392528#M70144</link>
    <description>&lt;P&gt;This worked for me, never heard of the untable command and the doc is a bit weak but this got what I needed. Thank you much!&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2018 14:10:57 GMT</pubDate>
    <dc:creator>benthehen100</dc:creator>
    <dc:date>2018-09-26T14:10:57Z</dc:date>
    <item>
      <title>Can you help me output field name, value from stats table to CSV?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-output-field-name-value-from-stats-table-to-CSV/m-p/392526#M70142</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to get a very specific output format that can be fed into our ticketing system.&lt;/P&gt;

&lt;P&gt;I have the following table in Splunk, top line is field names:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sender                             recipient                                 subject
lolwut@domain.com     bob@company.com                                   example1
lolwut@domain.com     alice@company.com                                   example2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This can either be a table or a set of stats values() multivalue fields.&lt;/P&gt;

&lt;P&gt;I need the final table to output to a CSV like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sender            lolwut@domain.com
sender            lolwut@domain.com
recipient         bob@company.com
recipient          alice@company.com
subject            example1
subject            example2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Sep 2018 01:25:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-output-field-name-value-from-stats-table-to-CSV/m-p/392526#M70142</guid>
      <dc:creator>benthehen100</dc:creator>
      <dc:date>2018-09-26T01:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me output field name, value from stats table to CSV?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-output-field-name-value-from-stats-table-to-CSV/m-p/392527#M70143</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search giving fields sender recipient subject
| eval temp=1 
| untable temp fieldName fieldValue
| fields - temp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Sep 2018 04:35:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-output-field-name-value-from-stats-table-to-CSV/m-p/392527#M70143</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-09-26T04:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me output field name, value from stats table to CSV?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-output-field-name-value-from-stats-table-to-CSV/m-p/392528#M70144</link>
      <description>&lt;P&gt;This worked for me, never heard of the untable command and the doc is a bit weak but this got what I needed. Thank you much!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 14:10:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-output-field-name-value-from-stats-table-to-CSV/m-p/392528#M70144</guid>
      <dc:creator>benthehen100</dc:creator>
      <dc:date>2018-09-26T14:10:57Z</dc:date>
    </item>
  </channel>
</rss>

