<?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: Expand the multivalue fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674609#M230913</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261968"&gt;@RSS_STT&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;as I said, you can use my search and after use some conditions to filter results.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2024 06:58:59 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2024-01-18T06:58:59Z</dc:date>
    <item>
      <title>Expand the multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674472#M230877</link>
      <description>&lt;P&gt;Trying to expand the multivalue field with one to one mapping as shown in image.&lt;/P&gt;&lt;P&gt;mvexpand create multiple row with all column matching value.&lt;/P&gt;&lt;P&gt;Actual data with multivalue.&lt;/P&gt;&lt;TABLE width="605"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="43"&gt;child&lt;/TD&gt;&lt;TD width="79"&gt;child_Name&lt;/TD&gt;&lt;TD width="140"&gt;dv_class&lt;/TD&gt;&lt;TD width="162"&gt;n_name&lt;/TD&gt;&lt;TD width="60"&gt;direction&lt;/TD&gt;&lt;TD width="71"&gt;name&lt;/TD&gt;&lt;TD width="50"&gt;parent&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;55555&lt;/TD&gt;&lt;TD width="79"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="140"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="60"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="50"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 14:08:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674472#M230877</guid>
      <dc:creator>RSS_STT</dc:creator>
      <dc:date>2024-01-18T14:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Expand the multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674476#M230878</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261968"&gt;@RSS_STT&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I suppose that your search is something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your-search&amp;gt;
| stats 
   values(child_Name) AS child_Name
   values(dv_u_parent_class) AS dv_u_parent_class
   values(fqdn_name) AS fqdn_name
   values(direction) AS direction
   values(name) AS name
   values(parent) AS parent
   BY child	&lt;/LI-CODE&gt;&lt;P&gt;You shoud try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your-search&amp;gt;
| stats 
   values(fqdn_name) AS fqdn_name
   values(name) AS name
   BY child child_Name dv_u_parent_class direction parent&lt;/LI-CODE&gt;&lt;P&gt;I could be more detailed if you can share your search.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 08:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674476#M230878</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-01-17T08:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Expand the multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674479#M230879</link>
      <description>&lt;P&gt;Yes, I was trying the first query shared by you previously but second query shared by you also creating 96 record where i'm expecting only 4 record.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 08:33:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674479#M230879</guid>
      <dc:creator>RSS_STT</dc:creator>
      <dc:date>2024-01-17T08:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Expand the multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674481#M230880</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261968"&gt;@RSS_STT&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;probably there are more combinations of your values, not only 4.&lt;/P&gt;&lt;P&gt;You have two solutions: use less fields as keys in the stats command, but you'll have some filed with multivalue.&lt;/P&gt;&lt;P&gt;Otherwise you should identify some rules to filter your results.&lt;/P&gt;&lt;P&gt;Anyway, the only way to have only one value in a stats command is to put it in the BY clause.&lt;/P&gt;&lt;P&gt;There's also another solution, but in this way you loose some results: instead values, you could use the first option, taking only one value for each: I don't know (but I don't think) that this is acceptable for you!&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 08:44:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674481#M230880</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-01-17T08:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Expand the multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674482#M230881</link>
      <description>&lt;P&gt;It is not clear how you arrived at your current state, and it might be easier to solve with some sight of your current search and events (as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; has indicated), however, assuming you still want to go forward from where you seem to be, you could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval row=mvrange(0,mvcount(child_Name))
| mvexpand row
| foreach child_Name direction dv_u_parent_class parent
    [| eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=mvindex(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,row)]
| fields - _row&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 17 Jan 2024 08:44:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674482#M230881</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-01-17T08:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Expand the multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674507#M230882</link>
      <description>&lt;P&gt;As &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt; already noticed, you probably used a lot of values() in your stats.&lt;/P&gt;&lt;P&gt;As you can see yourself, it results with a list of multivalued fields. The problem with that is that each of those multivalued fields is a separate entity and there is no relationship between them. So you can reliably split those values into single rows unless you have a very very strong guarantee for some properties of your data.&lt;/P&gt;&lt;P&gt;For example, for source data like&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;field1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;field2&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;field3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;2&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;4&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;6&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;8&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;P&gt;11&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;You'd get a result like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;values(field1)&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;values(field2)&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;values(field3)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;2&lt;BR /&gt;4&lt;BR /&gt;6&lt;BR /&gt;8&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;3&lt;BR /&gt;5&lt;BR /&gt;9&lt;BR /&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;If you tried "unpacking" it assuming that the values from the two latter colums match 1-1 you'd get completely ridiculous results.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 12:30:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674507#M230882</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-01-17T12:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expand the multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674606#M230911</link>
      <description>&lt;P&gt;it's possible to write partial data in to lookup file on base on some condition.&lt;/P&gt;&lt;P&gt;Like...&lt;/P&gt;&lt;P&gt;if dv_u_parent_class = ci_appld than outputlookup append=true abc.csv&lt;/P&gt;&lt;P&gt;|where&amp;nbsp;dv_u_parent_class != ci_appld&lt;/P&gt;&lt;P&gt;and run time query should show rest two events.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE width="605"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="43"&gt;child&lt;/TD&gt;&lt;TD width="79"&gt;child_Name&lt;/TD&gt;&lt;TD width="140"&gt;dv_u_parent_class&lt;/TD&gt;&lt;TD width="162"&gt;fqdn_name&lt;/TD&gt;&lt;TD width="60"&gt;direction&lt;/TD&gt;&lt;TD width="71"&gt;name&lt;/TD&gt;&lt;TD width="50"&gt;&lt;P&gt;parent&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;55555&lt;/TD&gt;&lt;TD width="79"&gt;xyz PROD&lt;/TD&gt;&lt;TD width="140"&gt;&lt;BR /&gt;ci_appld&lt;/TD&gt;&lt;TD&gt;xyz.srv.com&lt;/TD&gt;&lt;TD width="60"&gt;R toY&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD width="50"&gt;111111&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;55555&lt;/TD&gt;&lt;TD width="79"&gt;abc PROD&lt;/TD&gt;&lt;TD width="140"&gt;ci_appld&lt;/TD&gt;&lt;TD&gt;xyz.srv.com&lt;/TD&gt;&lt;TD width="60"&gt;&lt;BR /&gt;R to Y&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD width="50"&gt;&lt;BR /&gt;222222&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;55555&lt;/TD&gt;&lt;TD width="79"&gt;zzzz-FSE2&lt;/TD&gt;&lt;TD width="140"&gt;ci_netcom&lt;/TD&gt;&lt;TD&gt;xyz.srv.com&lt;/TD&gt;&lt;TD width="60"&gt;Y to R&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;333333&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;55555&lt;/TD&gt;&lt;TD width="79"&gt;abc.srv.com&lt;/TD&gt;&lt;TD width="140"&gt;ci_esx_app&lt;/TD&gt;&lt;TD&gt;xyz.srv.com&lt;/TD&gt;&lt;TD width="60"&gt;Y to R&lt;/TD&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;444444&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 18 Jan 2024 06:48:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674606#M230911</guid>
      <dc:creator>RSS_STT</dc:creator>
      <dc:date>2024-01-18T06:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Expand the multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674609#M230913</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261968"&gt;@RSS_STT&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;as I said, you can use my search and after use some conditions to filter results.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 06:58:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674609#M230913</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-01-18T06:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Expand the multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674622#M230922</link>
      <description>&lt;P&gt;Im able to get that result but not getting logic to write filter data into lookup and later drop the event which written to lookup.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 08:04:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674622#M230922</guid>
      <dc:creator>RSS_STT</dc:creator>
      <dc:date>2024-01-18T08:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expand the multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674627#M230926</link>
      <description>&lt;P&gt;Logic that you could use could go something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your search&amp;gt;
| appendpipe
  [| where &amp;lt;conditions for events you want to output&amp;gt;
   | outputlookup &amp;lt;your csv&amp;gt;
   | where false()
   ``` This removes all the events so that they are not appended to your main event pipeline ```
  ]
| where &amp;lt;conditions for events you want to keep i.e. not the events you wrote to the csv&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 18 Jan 2024 09:57:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Expand-the-multivalue-fields/m-p/674627#M230926</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-01-18T09:57:37Z</dc:date>
    </item>
  </channel>
</rss>

