<?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: Producing a csv based on a complex business logic? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618632#M215018</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/67425"&gt;@starcher&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your feedback.&lt;/P&gt;&lt;P&gt;We have a lookup that has the following data and we present it to our users via a dashboard -&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;number of boxes, customer name, address
3	Alan D.		6 Pixel Rd. TX
5	Yusuf A.	11 Apple Ave. FL
3	Michele Y. 	9 Monitor Lake IL&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dashboard user will have a button to create an exportable csv. Based on the number of boxes, the exportable csv will have three rows for Alan, five for Yusuf and three for Michele with their addresses.&lt;/P&gt;&lt;P&gt;Can we do it with SPL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Oct 2022 20:08:27 GMT</pubDate>
    <dc:creator>danielbb</dc:creator>
    <dc:date>2022-10-27T20:08:27Z</dc:date>
    <item>
      <title>How to produce a csv based on a complex business logic?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618468#M214961</link>
      <description>&lt;P&gt;We have a Splunk UI that allows the users to export a certain set of the rows from a lookup. The caveat is that each row might produce multiple output rows with quite a complex logic.&lt;BR /&gt;&lt;BR /&gt;So, I wonder whether to use the mv set of functions maybe coupled with the map command or to develop a python function to do it.&lt;BR /&gt;&lt;BR /&gt;Any suggestions?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 21:32:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618468#M214961</guid>
      <dc:creator>danielbb</dc:creator>
      <dc:date>2022-10-27T21:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Producing a csv based on a complex business logic?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618503#M214975</link>
      <description>&lt;P&gt;Use python. Multi value manipulation can be complex and fragile. With various limitations you will find the hard way.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 23:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618503#M214975</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2022-10-26T23:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Producing a csv based on a complex business logic?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618538#M214989</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/196884"&gt;@danielbb&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/67425"&gt;@starcher&lt;/a&gt;&amp;nbsp;said, I'd use a python script as the last solution to your need,&amp;nbsp;unless you are a super python expert, and probably I'd avoid in every case!&lt;/P&gt;&lt;P&gt;I'd create a search using all your rules and with this search I'd create a report or a dashboard.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giusppe&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 07:08:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618538#M214989</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-27T07:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Producing a csv based on a complex business logic?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618632#M215018</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/67425"&gt;@starcher&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your feedback.&lt;/P&gt;&lt;P&gt;We have a lookup that has the following data and we present it to our users via a dashboard -&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;number of boxes, customer name, address
3	Alan D.		6 Pixel Rd. TX
5	Yusuf A.	11 Apple Ave. FL
3	Michele Y. 	9 Monitor Lake IL&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dashboard user will have a button to create an exportable csv. Based on the number of boxes, the exportable csv will have three rows for Alan, five for Yusuf and three for Michele with their addresses.&lt;/P&gt;&lt;P&gt;Can we do it with SPL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 20:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618632#M215018</guid>
      <dc:creator>danielbb</dc:creator>
      <dc:date>2022-10-27T20:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Producing a csv based on a complex business logic?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618640#M215021</link>
      <description>&lt;P&gt;Use mvrange to generate a multivalue field with a value for each box, then use mvexpand to create one row for each value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval events="3,Alan D.,6 Pixel Rd. TX;5,Yusuf A.,11 Apple Ave. FL;3,Michele Y.,9 Monitor Lake IL"
| eval events=split(events, ";") | mvexpand events
| rex field=events "^(?&amp;lt;num_of_boxes&amp;gt;[^\,]*)\,(?&amp;lt;customer_name&amp;gt;[^\,]*)\,(?&amp;lt;address&amp;gt;[^\,]*)"
| eval item_num=mvrange(1, num_of_boxes+1)
| mvexpand item_num
| table num_of_boxes customer_name address item_num&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 21:32:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618640#M215021</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-10-27T21:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Producing a csv based on a complex business logic?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618684#M215029</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/196884"&gt;@danielbb&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you could create a dashboard with a dropdown input that permits to choose the customer_name and then displays the rows of the lookup related to that name.&lt;/P&gt;&lt;P&gt;then you can export it in csv using the export button in Splunk panels or your custom script.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 06:13:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618684#M215029</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-28T06:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Producing a csv based on a complex business logic?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618738#M215046</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;@johnhuan - really neat !!!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 14:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-produce-a-csv-based-on-a-complex-business-logic/m-p/618738#M215046</guid>
      <dc:creator>danielbb</dc:creator>
      <dc:date>2022-10-28T14:05:48Z</dc:date>
    </item>
  </channel>
</rss>

