<?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: Display all the values of the multi-value column(array-like) in different rows in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629575#M218709</link>
    <description>&lt;P&gt;I don't have a way to produce the format you seek, but I can combine the values so they should all export.&amp;nbsp; Perhaps Excel offers a way to break them up.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="{\"col1\":\"1\",\"col2\":\"2\",\"col3\":\"3\",\"col4\":\"4\",\"b\":[{\"col5\":\"5\",\"col6\":[\"6\"]},{\"col5\":\"55\",\"col6\":[\"66\",\"666\"]}]}" | spath
| rename b{}.col5 as "col5", b{}.col6{} as "col6"
| eval col5=mvjoin(col5,", "), col6=mvjoin(col6, ", ")
| table col1 col2 col5 col6&lt;/LI-CODE&gt;&lt;P&gt;Stepping back a bit.&amp;nbsp; What problem are you trying to solve with Excel?&amp;nbsp; Perhaps a native Splunk report/dashboard can do the job.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 21:40:48 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-02-03T21:40:48Z</dc:date>
    <item>
      <title>How to display all the values of the multi-value column(array-like) in different rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629552#M218701</link>
      <description>&lt;P&gt;I have the raw data in format :&lt;BR /&gt;&lt;SPAN&gt;{"col1":"1",{col2":"2"},{.........(continue)&lt;/SPAN&gt;&lt;BR /&gt;which if I have to visualize using&amp;nbsp;&lt;A href="https://codebeautify.org/string-to-json-online" target="_blank" rel="noopener"&gt;https://codebeautify.org/string-to-json-online&lt;/A&gt; :&lt;/P&gt;
&lt;PRE&gt;Object{1}
  -&amp;gt;a{4}
     col1: 1
     col2: 2
     col3: 3
     col4: 4
  -&amp;gt;b[3]
     -&amp;gt;0{3}
        col5:"5
        col6[0]&lt;BR /&gt;           0:6
     -&amp;gt;1{3}
        col5: "55"
        col6[1]&lt;BR /&gt;          0:66&lt;BR /&gt;      -&amp;gt;2{3}
        col5: 55
        col6[1]&lt;BR /&gt;          0:666&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;And if my Splunk query is like&amp;nbsp;&lt;BR /&gt;index="api"&lt;BR /&gt;| rename a.col1 as "col1",a.col2 as "col2", b{}.col5 as "col5", b{}.col6{} as "col6"&lt;BR /&gt;| table "col1","col2","col5","col6"&lt;BR /&gt;&lt;BR /&gt;it display me:&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;col1&lt;/TD&gt;
&lt;TD width="25%"&gt;col2&lt;/TD&gt;
&lt;TD width="25%"&gt;col5&lt;/TD&gt;
&lt;TD width="25%"&gt;col6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;1&lt;/TD&gt;
&lt;TD width="25%"&gt;2&lt;/TD&gt;
&lt;TD width="25%"&gt;5&lt;BR /&gt;55&lt;/TD&gt;
&lt;TD width="25%"&gt;6&lt;BR /&gt;66&lt;BR /&gt;666&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Moreover , if I export it in csv&lt;BR /&gt;It only shows me first value of array(multi-value)&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;col1&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;col2&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;col3&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;col4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;5&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but should be like : (each row 1:1 mapped)&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;U&gt;&lt;STRONG&gt;MY DESIRED TABLE&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;col1&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;col2&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;col5&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;col6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;5&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;55&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;66&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;55&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;666&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 22:16:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629552#M218701</guid>
      <dc:creator>kasis152</dc:creator>
      <dc:date>2023-02-03T22:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Display all the values of the multi-value column(array-like) in different rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629563#M218703</link>
      <description>&lt;P&gt;It would help if you showed the raw data rather than some strange pretty-printed version of it.&amp;nbsp; We can't test solutions with the string-to-json-online output.&lt;/P&gt;&lt;P&gt;I believe there is more to the query than is shown because what is shown won't produce the given output.&amp;nbsp; I suspect there is a stats values(...) command being used and that's why only one 55 appears in the col5 field.&amp;nbsp; If you replace values() with list() then the values list won't be deduplicated.&amp;nbsp; Then you can expand col5 and col6 after first zipping them together.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats list(col5) as col5, list(col6) as col6 by col1,col2
| eval col56=mvzip(col5, col6) 
| mvexpand col56
| eval col56=split(col56, ",") 
| eval col5=mvindex(col56,0), col6=mvindex(col56,1)
| table col1 col2 col5 col6&lt;/LI-CODE&gt;&lt;P&gt;This presumes col5 and col6 will always have the same number of values.&amp;nbsp; If that's not the case then another solution is needed.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 19:37:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629563#M218703</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-03T19:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Display all the values of the multi-value column(array-like) in different rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629571#M218707</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957" target="_blank"&gt;@richgalloway&lt;/A&gt;&lt;BR /&gt;&lt;/STRONG&gt;Yes you were right , Raw data might help u better answer my question .&lt;BR /&gt;but your query gave me such better shape .&lt;BR /&gt;my visualization was kind of off .&lt;BR /&gt;&lt;BR /&gt;Can you help me rewrite the query , given that objective is still the save to obtain the same desired output as above.&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Correction:&lt;/FONT&gt;&lt;BR /&gt;&lt;/STRONG&gt;My raw data :&amp;nbsp;&lt;BR /&gt;{"col1":"1","col2":"2","col3":"3","col4":"4","b":[{"col5":"5","col6":["6"]},{"col5":"55","col6":["66","666"]}]}&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-02-03 151757.jpg" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23714i3D27FD57032CE930/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-02-03 151757.jpg" alt="Screenshot 2023-02-03 151757.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 20:34:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629571#M218707</guid>
      <dc:creator>kasis152</dc:creator>
      <dc:date>2023-02-03T20:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Display all the values of the multi-value column(array-like) in different rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629575#M218709</link>
      <description>&lt;P&gt;I don't have a way to produce the format you seek, but I can combine the values so they should all export.&amp;nbsp; Perhaps Excel offers a way to break them up.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="{\"col1\":\"1\",\"col2\":\"2\",\"col3\":\"3\",\"col4\":\"4\",\"b\":[{\"col5\":\"5\",\"col6\":[\"6\"]},{\"col5\":\"55\",\"col6\":[\"66\",\"666\"]}]}" | spath
| rename b{}.col5 as "col5", b{}.col6{} as "col6"
| eval col5=mvjoin(col5,", "), col6=mvjoin(col6, ", ")
| table col1 col2 col5 col6&lt;/LI-CODE&gt;&lt;P&gt;Stepping back a bit.&amp;nbsp; What problem are you trying to solve with Excel?&amp;nbsp; Perhaps a native Splunk report/dashboard can do the job.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 21:40:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629575#M218709</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-03T21:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Display all the values of the multi-value column(array-like) in different rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629576#M218710</link>
      <description>&lt;P class="lia-align-left"&gt;The ultimate goal is to have the Dashboard in Tableau .&lt;BR /&gt;Hence, wanted a formatted data.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 21:42:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629576#M218710</guid>
      <dc:creator>kasis152</dc:creator>
      <dc:date>2023-02-03T21:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Display all the values of the multi-value column(array-like) in different rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629581#M218712</link>
      <description>&lt;P&gt;Tableau can access data in Splunk using ODBC (at least it could - I heard rumors that's not possible with some versions of Tableau).&amp;nbsp; With ODBC, Tableau launches a saved search that runs on Splunk and the results are automatically exported to Tableau.&amp;nbsp; It's up to the saved search to format the output, unless Tableau can perform additional transformations.&amp;nbsp; It's been several years since I used Tableau so that's about all the help I can offer there.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 22:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629581#M218712</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-03T22:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to display all the values of the multi-value column(array-like) in different rows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629584#M218713</link>
      <description>&lt;P&gt;Appreciate your help&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 22:44:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-all-the-values-of-the-multi-value-column-array/m-p/629584#M218713</guid>
      <dc:creator>kasis152</dc:creator>
      <dc:date>2023-02-03T22:44:39Z</dc:date>
    </item>
  </channel>
</rss>

