<?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 split a field having multiple lines into individual lines and finally display in table format in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-field-having-multiple-lines-into-individual-lines/m-p/656790#M226852</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;- Its not working for this requirement. I see its returning entire output field value multiple times (equal to number of lines in the field.)&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 08:59:07 GMT</pubDate>
    <dc:creator>Splunk_sid</dc:creator>
    <dc:date>2023-09-06T08:59:07Z</dc:date>
    <item>
      <title>How to split a field having multiple lines into individual lines and finally display in table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-field-having-multiple-lines-into-individual-lines/m-p/656777#M226845</link>
      <description>&lt;P&gt;I have field in the event which has multi-line data (between double quotes) and I need to split them into individual lines and finally extract them into a table format for each of the header. Basically, the requirement is to report this data in table format to users.&lt;/P&gt;&lt;P&gt;output = "DbName|CurrentSizeGB|UsedSpaceGB|FreeSpaceGB|ExtractedDate&lt;BR /&gt;abc|60.738|39.844|20.894|Sep 5 2023 10:00AM&lt;BR /&gt;def|0.098|0.017|0.081|Sep 5 2023 10:00AM&lt;BR /&gt;pqr|15.859|0.534|15.325|Sep 5 2023 10:00AM&lt;BR /&gt;xyz|32.733|0.675|32.058|Sep 5 2023 10:00AM"&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 07:23:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-field-having-multiple-lines-into-individual-lines/m-p/656777#M226845</guid>
      <dc:creator>Splunk_sid</dc:creator>
      <dc:date>2023-09-06T07:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a field having multiple lines into individual lines and finally display in table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-field-having-multiple-lines-into-individual-lines/m-p/656779#M226847</link>
      <description>&lt;P&gt;The command is called&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Multikv#multikv" target="_blank" rel="noopener"&gt;multikv&lt;/A&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename _raw as temp, output AS _raw
| rex mode=sed "s/\|/,/g"
| multikv
| rename temp as _raw&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 06 Sep 2023 07:41:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-field-having-multiple-lines-into-individual-lines/m-p/656779#M226847</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-09-06T07:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a field having multiple lines into individual lines and finally display in table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-field-having-multiple-lines-into-individual-lines/m-p/656790#M226852</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;- Its not working for this requirement. I see its returning entire output field value multiple times (equal to number of lines in the field.)&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 08:59:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-field-having-multiple-lines-into-individual-lines/m-p/656790#M226852</guid>
      <dc:creator>Splunk_sid</dc:creator>
      <dc:date>2023-09-06T08:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a field having multiple lines into individual lines and finally display in table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-field-having-multiple-lines-into-individual-lines/m-p/656919#M226895</link>
      <description>&lt;BLOCKQUOTE&gt;Its not working for this requirement. I see its returning entire output field value multiple times (equal to number of lines in the field.)&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Note "not working" is about the least informative phrase in the best of scenarios as it conveys virtually no information. &amp;nbsp;Yes, the original output field is &lt;STRONG&gt;expected&lt;/STRONG&gt; to be attached to &lt;U&gt;each row&lt;/U&gt;. &amp;nbsp;If you don't want to see that, filter it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval _raw = replace(output, "\|", ",")
| multikv
| fields - _* linecount output&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The real question is: are fields DbName, CurrentSizeGB, etc., extracted? (Each row is its own event. &amp;nbsp;If you want multivalued fields in &amp;nbsp;instead, you can do some stats.) &amp;nbsp;Here is an emulation that you can play with and compare with real data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval output = "DbName|CurrentSizeGB|UsedSpaceGB|FreeSpaceGB|ExtractedDate
abc|60.738|39.844|20.894|Sep 5 2023 10:00AM
def|0.098|0.017|0.081|Sep 5 2023 10:00AM
pqr|15.859|0.534|15.325|Sep 5 2023 10:00AM
xyz|32.733|0.675|32.058|Sep 5 2023 10:00AM"
``` data emulation above ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above emulated input combined with the search gives&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;CurrentSizeGB&lt;/TD&gt;&lt;TD&gt;DbName&lt;/TD&gt;&lt;TD&gt;ExtractedDate&lt;/TD&gt;&lt;TD&gt;FreeSpaceGB&lt;/TD&gt;&lt;TD&gt;UsedSpaceGB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;60.738&lt;/TD&gt;&lt;TD&gt;abc&lt;/TD&gt;&lt;TD&gt;Sep 5 2023 10:00AM&lt;/TD&gt;&lt;TD&gt;20.894&lt;/TD&gt;&lt;TD&gt;39.844&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0.098&lt;/TD&gt;&lt;TD&gt;def&lt;/TD&gt;&lt;TD&gt;Sep 5 2023 10:00AM&lt;/TD&gt;&lt;TD&gt;0.081&lt;/TD&gt;&lt;TD&gt;0.017&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15.859&lt;/TD&gt;&lt;TD&gt;pqr&lt;/TD&gt;&lt;TD&gt;Sep 5 2023 10:00AM&lt;/TD&gt;&lt;TD&gt;15.325&lt;/TD&gt;&lt;TD&gt;0.534&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;32.733&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;Sep 5 2023 10:00AM&lt;/TD&gt;&lt;TD&gt;32.058&lt;/TD&gt;&lt;TD&gt;0.675&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;If these fields are not extracted as expected, you need to illustrate your original data more precisely so volunteers can help diagnose. (Anonymous as needed.) &amp;nbsp;In addition, illustration of actual output will also be helpful instead of a useless phrase like "not working".&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 06:54:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-field-having-multiple-lines-into-individual-lines/m-p/656919#M226895</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-09-07T06:54:42Z</dc:date>
    </item>
  </channel>
</rss>

