<?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: Dynamic parsing ? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518096#M9243</link>
    <description>&lt;P&gt;What is the relationship between the ID and the result you want?&lt;/P&gt;</description>
    <pubDate>Sun, 06 Sep 2020 10:24:50 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2020-09-06T10:24:50Z</dc:date>
    <item>
      <title>How to dynamically parse a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518031#M9240</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;i'm new on splunk and i want to know the best way to accomplish the following task&lt;/P&gt;
&lt;P&gt;&lt;U&gt;IINFORMATION INPUT :&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;i have DATA in xml format&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#FF6600"&gt;in the event&amp;nbsp; the value of ID can be between 1 and 500&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#0000FF"&gt;in the event there is at least 15 ProductX&amp;nbsp; (it's can be ProductA, ProductB, ProductC, ... ,ProductZ)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#0000FF"&gt;ProductX&lt;/FONT&gt; can be use for 300 differents ID&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;EventData&amp;gt;
&amp;lt;Data Name="ID"&amp;gt;5&amp;lt;/Data&amp;gt; 
&amp;lt;Data Name="ProductA"&amp;gt;Screw 16&amp;lt;/Data&amp;gt; 
&amp;lt;Data Name="ProductB"&amp;gt;Screw 11 &amp;lt;/Data&amp;gt; 
&amp;lt;Data Name="ProductC"&amp;gt;Screw G&amp;lt;/Data&amp;gt; 
&amp;lt;Data Name="ProductD"&amp;gt;Screw 9&amp;lt;/Data&amp;gt; 
...
...
&amp;lt;/EventData&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;U&gt;GOAL :&lt;BR /&gt;&lt;/U&gt;i want dynamically parse a field called "Result" which depends of the ID which is in the event&lt;/P&gt;
&lt;P&gt;&lt;U&gt;EXAMPLE :&lt;BR /&gt;&lt;/U&gt;if &lt;FONT color="#FF6600"&gt;ID = 5&lt;/FONT&gt; i want that my field "Result" is egal to the value of &lt;FONT color="#0000FF"&gt;productB&lt;/FONT&gt;. (Result = Screw11)&lt;BR /&gt;if&lt;FONT color="#FF6600"&gt; ID = 6&lt;/FONT&gt; i want that my field "Result" is egal to the value of&lt;FONT color="#0000FF"&gt; productD.&lt;/FONT&gt; (Result = Screw9)&lt;BR /&gt;if &lt;FONT color="#FF6600"&gt;ID = 240&lt;/FONT&gt; i want that my field "Result" is egal to the value of &lt;FONT color="#0000FF"&gt;productB.&lt;/FONT&gt; (Result = Screw11)&lt;BR /&gt;if &lt;FONT color="#FF6600"&gt;ID = 499&lt;/FONT&gt; i want that my field "Result" is egal to the value of &lt;FONT color="#0000FF"&gt;productB.&lt;/FONT&gt; (Result = Screw11)&lt;BR /&gt;and so on..&lt;/P&gt;
&lt;P&gt;i try to do the parsing with prop.conf file and trabsforms.conf with INGEST_EVAL and IF and OR but no joy..&lt;/P&gt;
&lt;P&gt;any solutions / advices for saving performances / best way to do this please?&lt;/P&gt;
&lt;P&gt;Thx !!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_blowing_a_kiss:"&gt;😘&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 17:39:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518031#M9240</guid>
      <dc:creator>CaptainPiPoTron</dc:creator>
      <dc:date>2020-09-07T17:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic parsing ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518059#M9241</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225877"&gt;@CaptainPiPoTron&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you want the Result field as an indexed field?&lt;/P&gt;&lt;P&gt;The better solution would be to create a auto lookup with fields ID &amp;amp; Result. Please note,&amp;nbsp;this will be extracted/added at search time&lt;/P&gt;&lt;P&gt;Steps:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a csv file with ID &amp;amp; result fields&lt;/LI&gt;&lt;LI&gt;add csv file to splunk as lookup table&lt;/LI&gt;&lt;LI&gt;create definition and auto-lookup for the above lookup.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Sep 2020 22:58:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518059#M9241</guid>
      <dc:creator>anilchaithu</dc:creator>
      <dc:date>2020-09-05T22:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic parsing ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518062#M9242</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/204579"&gt;@anilchaithu&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your answer !&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; but i think i can't do an auto lookup with FIELDS ID &amp;amp; RESULT (if i understand correctly the lookup table)&lt;/P&gt;&lt;P&gt;because i don't know the value of productA before i got it in the event ..and it can be anything example : productA could be screw 50 or hammer 60 etc...&lt;BR /&gt;&lt;BR /&gt;and yes i want the&amp;nbsp;&lt;SPAN&gt;Result field as an indexed field&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":hugging_face:"&gt;🤗&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Sep 2020 23:17:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518062#M9242</guid>
      <dc:creator>CaptainPiPoTron</dc:creator>
      <dc:date>2020-09-05T23:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic parsing ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518096#M9243</link>
      <description>&lt;P&gt;What is the relationship between the ID and the result you want?&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 10:24:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518096#M9243</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-06T10:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic parsing ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518100#M9244</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"result" it's just the name of the field which contains the value of productA or ProductB or ProductX&amp;nbsp; according to the number ID&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 11:54:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518100#M9244</guid>
      <dc:creator>CaptainPiPoTron</dc:creator>
      <dc:date>2020-09-06T11:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic parsing ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518101#M9245</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225877"&gt;@CaptainPiPoTron&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your example data appears to be for one event&amp;nbsp; (attribute name"ID", value 5)&lt;/P&gt;&lt;P&gt;There are many "Data" elements with attributes name ProductX (presumably for each "event")&lt;/P&gt;&lt;P&gt;Does your required "result" field contain all the Product values (as a multivalue field) or a specific value "depending on event id"?&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="24px"&gt;ID&lt;/TD&gt;&lt;TD width="50%" height="24px"&gt;Result&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="104px"&gt;5&lt;/TD&gt;&lt;TD width="50%" height="104px"&gt;&lt;P&gt;Screw 16&lt;BR /&gt;Screw 11&lt;BR /&gt;Screw G&lt;BR /&gt;Screw 9&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="24px"&gt;6&lt;/TD&gt;&lt;TD width="50%" height="24px"&gt;Hammer 60&lt;BR /&gt;Nail 20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="24px"&gt;240&lt;/TD&gt;&lt;TD width="50%" height="24px"&gt;Screw 11&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sun, 06 Sep 2020 12:08:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518101#M9245</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-06T12:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic parsing ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518102#M9246</link>
      <description>&lt;P&gt;&lt;SPAN&gt;hey&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;"result" field must contain a specific value "depending on event id"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;like in example&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;ID = 5&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;i want that my field "Result" is egal to the value of&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;productB&lt;/FONT&gt;&lt;SPAN&gt;. (Result = Screw11)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;ID = 6&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;i want that my field "Result" is egal to the value of&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;productD.&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;(Result = Screw9)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;ID = 240&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;i want that my field "Result" is egal to the value of&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;productB.&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;(Result = Screw11)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;ID = 499&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;i want that my field "Result" is egal to the value of&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;productB.&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;(Result = Screw11)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and so on..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 12:19:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518102#M9246</guid>
      <dc:creator>CaptainPiPoTron</dc:creator>
      <dc:date>2020-09-06T12:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic parsing ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518104#M9247</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225877"&gt;@CaptainPiPoTron&lt;/a&gt;&amp;nbsp; You haven't explained how splunk can be told which product to use for each event. Do you want to code if event 5 result = Screw 11, if event 6 result = Screw9, etc.? Probably not, so what does "depending on event id" actually mean, how does splunk know which product to return?&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 12:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518104#M9247</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-06T12:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic parsing ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518105#M9248</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's why i post here&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; i don't know how to do it ..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 12:32:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518105#M9248</guid>
      <dc:creator>CaptainPiPoTron</dc:creator>
      <dc:date>2020-09-06T12:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic parsing ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518106#M9249</link>
      <description>&lt;P&gt;Have a look at &lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-extract-name-value-pair-from-XML-datasource/td-p/264863" target="_self"&gt;this&lt;/A&gt; old answer which might help you extract some fields, which you can then work with to determine which value you want to make the result since you haven't made that clear (except in a few specific examples).&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 12:39:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-dynamically-parse-a-field/m-p/518106#M9249</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-06T12:39:40Z</dc:date>
    </item>
  </channel>
</rss>

