<?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 Is there a way to unbundle a list? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-unbundle-a-list/m-p/92618#M23914</link>
    <description>&lt;P&gt;I'm aggregating some values via 'chart list(value) as jobs by something' and then later on I want to produce a table that puts every value of 'jobs' into a single row. For example my query is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main | fields counter, job | dedup job, counter | chart list(job) as jobs by counter
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and my output is something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;---------------------
| counter   | job   |
|-------------------|
| counter1  | job11 |
|           | job12 |
|           | job13 |
| ------------------|
| counter2  | job21 |
|           | job22 |
---------------------
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and later on I do the following postprocess:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; search counter="counter2" | table jobs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I get the following response&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;---------
| job   |
| ------|
| job21 | (row1)
| job22 |
---------
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to get this response:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;---------
| job   |
|-------|
| job21 | (row1)
|-------|
| job22 | (row2)
---------
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I.e. I would like the resulting table to print every value of the 'jobs' list into a separate row of the table but the above command just gives me one row with all the list's values in it. Is there a way to do something like this?&lt;/P&gt;</description>
    <pubDate>Sat, 30 Apr 2011 01:29:26 GMT</pubDate>
    <dc:creator>natrixia</dc:creator>
    <dc:date>2011-04-30T01:29:26Z</dc:date>
    <item>
      <title>Is there a way to unbundle a list?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-unbundle-a-list/m-p/92618#M23914</link>
      <description>&lt;P&gt;I'm aggregating some values via 'chart list(value) as jobs by something' and then later on I want to produce a table that puts every value of 'jobs' into a single row. For example my query is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main | fields counter, job | dedup job, counter | chart list(job) as jobs by counter
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and my output is something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;---------------------
| counter   | job   |
|-------------------|
| counter1  | job11 |
|           | job12 |
|           | job13 |
| ------------------|
| counter2  | job21 |
|           | job22 |
---------------------
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and later on I do the following postprocess:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; search counter="counter2" | table jobs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I get the following response&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;---------
| job   |
| ------|
| job21 | (row1)
| job22 |
---------
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to get this response:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;---------
| job   |
|-------|
| job21 | (row1)
|-------|
| job22 | (row2)
---------
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I.e. I would like the resulting table to print every value of the 'jobs' list into a separate row of the table but the above command just gives me one row with all the list's values in it. Is there a way to do something like this?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2011 01:29:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-unbundle-a-list/m-p/92618#M23914</guid>
      <dc:creator>natrixia</dc:creator>
      <dc:date>2011-04-30T01:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to unbundle a list?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-unbundle-a-list/m-p/92619#M23915</link>
      <description>&lt;P&gt;In general, you should avoid the &lt;CODE&gt;list()&lt;/CODE&gt; function, and just do the original query as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main | stats count by counter, job | fields - count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the &lt;CODE&gt;fields&lt;/CODE&gt; and &lt;CODE&gt;dedup&lt;/CODE&gt; are unnecessary and redundant, as &lt;CODE&gt;chart&lt;/CODE&gt; or &lt;CODE&gt;stats&lt;/CODE&gt; does that anyway. &lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2011 07:52:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-unbundle-a-list/m-p/92619#M23915</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-04-30T07:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to unbundle a list?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-unbundle-a-list/m-p/92620#M23916</link>
      <description>&lt;P&gt;I wanted to do something like you suggested by I need the deduped values of 'counter' to be put into a dropdown menu.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2011 23:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-unbundle-a-list/m-p/92620#M23916</guid>
      <dc:creator>natrixia</dc:creator>
      <dc:date>2011-05-01T23:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to unbundle a list?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-unbundle-a-list/m-p/92621#M23917</link>
      <description>&lt;P&gt;Looks like the command I was looking for was mvexpand so it would be something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search counter="counter1" | table jobs | mvexpand jobs
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 May 2011 23:20:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-unbundle-a-list/m-p/92621#M23917</guid>
      <dc:creator>natrixia</dc:creator>
      <dc:date>2011-05-01T23:20:04Z</dc:date>
    </item>
  </channel>
</rss>

