<?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: Split values from each fields from output table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671585#M230131</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;Below is SPL&amp;nbsp; used,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="*****" host="sclp*" source="*****" "BOLT_ARIBA_ERROR_DETAILS:" "1-57d28402-9058-11ee-83b7-021a6f9d1f1c" "5bda7ec9"
| rex "(?ms)BOLT_ARIBA_ERROR_DETAILS: (?&amp;lt;details&amp;gt;\[.*\])"
| spath input=details output=ERROR_MESSAGE path={}.ERROR_MESSAGE
| spath input=details output=PO_NUMBER path={}.PO_NUMBER
| spath input=details output=MW_ERROR_CODE path={}.MW_ERROR_CODE
| spath input=details output=INVOICE_ID path={}.INVOICE_ID
| spath input=details output=MSG_GUID path={}.MSG_GUID
| spath input=details output=INVOICE_NUMBER path={}.INVOICE_NUMBER
| spath input=details output=UUID path={}.UUID
| spath input=details output=DB_TIMESTAMP path={}.DB_TIMESTAMP
| table ERROR_MESSAGE PO_NUMBER MW_ERROR_CODE INVOICE_ID MSG_GUID INVOICE_NUMBER UUID DB_TIMESTAMP&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 12 Dec 2023 15:06:09 GMT</pubDate>
    <dc:creator>KundanNagare23</dc:creator>
    <dc:date>2023-12-12T15:06:09Z</dc:date>
    <item>
      <title>Split values from each fields from output table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671578#M230129</link>
      <description>&lt;P&gt;We got output in table but all values are in one column&amp;nbsp; for each fields of output table. We want to split values in row. Below is the output table for reference. Please help to split it.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tempsnip.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28463iF3A1EC4D53C7B16A/image-size/large?v=v2&amp;amp;px=999" role="button" title="tempsnip.png" alt="tempsnip.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 13:54:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671578#M230129</guid>
      <dc:creator>KundanNagare23</dc:creator>
      <dc:date>2023-12-12T13:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Split values from each fields from output table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671584#M230130</link>
      <description>&lt;P&gt;It's probably better to split the data before the table is created.&amp;nbsp; Please share the current SPL.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 14:19:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671584#M230130</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-12-12T14:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Split values from each fields from output table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671585#M230131</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;Below is SPL&amp;nbsp; used,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="*****" host="sclp*" source="*****" "BOLT_ARIBA_ERROR_DETAILS:" "1-57d28402-9058-11ee-83b7-021a6f9d1f1c" "5bda7ec9"
| rex "(?ms)BOLT_ARIBA_ERROR_DETAILS: (?&amp;lt;details&amp;gt;\[.*\])"
| spath input=details output=ERROR_MESSAGE path={}.ERROR_MESSAGE
| spath input=details output=PO_NUMBER path={}.PO_NUMBER
| spath input=details output=MW_ERROR_CODE path={}.MW_ERROR_CODE
| spath input=details output=INVOICE_ID path={}.INVOICE_ID
| spath input=details output=MSG_GUID path={}.MSG_GUID
| spath input=details output=INVOICE_NUMBER path={}.INVOICE_NUMBER
| spath input=details output=UUID path={}.UUID
| spath input=details output=DB_TIMESTAMP path={}.DB_TIMESTAMP
| table ERROR_MESSAGE PO_NUMBER MW_ERROR_CODE INVOICE_ID MSG_GUID INVOICE_NUMBER UUID DB_TIMESTAMP&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 12 Dec 2023 15:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671585#M230131</guid>
      <dc:creator>KundanNagare23</dc:creator>
      <dc:date>2023-12-12T15:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Split values from each fields from output table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671639#M230137</link>
      <description>&lt;P&gt;That's not what I was expecting.&amp;nbsp; I expected a &lt;FONT face="courier new,courier"&gt;stats values&lt;/FONT&gt; command that was globbing field values together.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share a sample event?&amp;nbsp; How many events are in the sample output?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 19:52:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671639#M230137</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-12-12T19:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Split values from each fields from output table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671646#M230138</link>
      <description>&lt;P&gt;If I am understanding your question correctly I usually parse out an array of json objects as a mutlivalued field first and then use an mvexpand against that MV field. After this you can SPATH each json_object individually so its contents will be on its own row.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This will also prevent situation where there are some json objects whose key's may have null values and them not properly aligning in the final output.&lt;BR /&gt;&lt;BR /&gt;Here is an example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
    | eval
        event_id=sha256(tostring(random())),
        json_object="[{\"field1\": \"value_a\", \"field2\": \"value_b\", \"field3\": \"value_c\"},{\"field1\": \"value_x\", \"field2\": \"value_y\", \"field3\": \"value_z\"},{\"field1\": \"value_q\", \"field2\": \"value_r\", \"field3\": \"value_s\"},{\"field1\": \"value_a\", \"field2\": \"value_r\", \"field3\": \"value_c\", \"field4\": \"value_w\"},{\"field2\": \"value_a\", \"field3\": \"value_b\", \"field4\": \"value_s\"}]"
    | eval
        mv_json_object=spath(json_object, "{}")
    | fields - json_object
    | mvexpand mv_json_object
    | spath input=mv_json_object
    | fields - mv_json_object&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 12 Dec 2023 23:06:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-values-from-each-fields-from-output-table/m-p/671646#M230138</guid>
      <dc:creator>dtburrows3</dc:creator>
      <dc:date>2023-12-12T23:06:25Z</dc:date>
    </item>
  </channel>
</rss>

