<?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: JSON format - Duplicate value in field in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/680301#M80342</link>
    <description>&lt;P&gt;This is not working for my case , still i can see the duplication values in Verbrose mode&amp;nbsp; and in configured all 2 settings in props.conf newly&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2024 15:36:02 GMT</pubDate>
    <dc:creator>senmak</dc:creator>
    <dc:date>2024-03-11T15:36:02Z</dc:date>
    <item>
      <title>JSON format - Duplicate value in field</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/306811#M36671</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm currently working on a TA for browsing an Exchange mailbox and index some data extracted from  emails.&lt;BR /&gt;
I used the Add-on builder for this, and a python script as input method.&lt;/P&gt;

&lt;P&gt;I've an issue with indexed data: every value of every field is duplicated.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4149i3964D25575982E4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4150i65936753BE0F8D21/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I printed the JSON before writing the event into Splunk and it shows only 1 value.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    ...
    "content_type": "multipart/alternative;         boundary=\"b1_0b28091de0af32b14ad60d31c616a518\"",
    ...
    "date": "Tue, 7 Nov 2017 10:03:20 +0000", 
    ...
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is a short part of the input script&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;for item in reporter_mailbox.inbox.all().iterator():
        # Analyze the item and get the JSON format
        json_data = self.__analyze_item(item)
        if json_data is None:
            self.helper.log_debug("No data written")
            continue
        self.helper.log_debug("JSON Data:\r\n %s" % json_data)
        # Create the Splunk event object related to this item
        event = self.helper.new_event(source=self.helper.get_input_type(), index=self.helper.get_output_index(),
                                      sourcetype=self.helper.get_sourcetype(), data=json_data)
        # Write the event into Splunk
        splunk_writer.write_event(event)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also the props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_ta]
#INDEXED_EXTRACTIONS = JSON
#KV_MODE = json
TIMESTAMP_FIELDS = date
TRUNCATE = 0
category = Splunk App Add-on Builder
pulldown_type = 1

# Fields Aliases
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Anyone has an idea about where those duplicate values come from ?&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 17:15:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/306811#M36671</guid>
      <dc:creator>olivier_ma</dc:creator>
      <dc:date>2018-01-15T17:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: JSON format - Duplicate value in field</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/306812#M36672</link>
      <description>&lt;P&gt;Take a look at &lt;A href="https://answers.splunk.com/answers/223095/why-is-my-sourcetype-configuration-for-json-events.html" target="_blank"&gt;https://answers.splunk.com/answers/223095/why-is-my-sourcetype-configuration-for-json-events.html&lt;/A&gt; and hopefully the solution for that also applies here.&lt;/P&gt;

&lt;P&gt;Also, I see you have a commented-out INDEXED_EXTRACTIONS configuration. If you had that enabled when the events were indexed, that would have created one value for each field and saved that to disk persistently at index time. When you later disabled INDEXED_EXTRACTIONS and used the AUTO_KV_MODE to extract fields at search time, both field values would be combined for existing events. That could be the root cause of the duplication on existing events, no?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:43:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/306812#M36672</guid>
      <dc:creator>asieira</dc:creator>
      <dc:date>2020-09-29T17:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: JSON format - Duplicate value in field</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/306813#M36673</link>
      <description>&lt;P&gt;hey&lt;/P&gt;

&lt;P&gt;add this in props.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;KV_MODE = none
AUTO_KV_JSON = false
INDEXED_EXTRACTIONS = JSON
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps !&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 18:43:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/306813#M36673</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-15T18:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: JSON format - Duplicate value in field</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/306814#M36674</link>
      <description>&lt;P&gt;Exactly what I'm looking for. Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 12:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/306814#M36674</guid>
      <dc:creator>olivier_ma</dc:creator>
      <dc:date>2018-01-16T12:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: JSON format - Duplicate value in field</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/306815#M36675</link>
      <description>&lt;P&gt;Thanks, that was the good solution.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 12:10:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/306815#M36675</guid>
      <dc:creator>olivier_ma</dc:creator>
      <dc:date>2018-01-16T12:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: JSON format - Duplicate value in field</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/680301#M80342</link>
      <description>&lt;P&gt;This is not working for my case , still i can see the duplication values in Verbrose mode&amp;nbsp; and in configured all 2 settings in props.conf newly&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 15:36:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/680301#M80342</guid>
      <dc:creator>senmak</dc:creator>
      <dc:date>2024-03-11T15:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: JSON format - Duplicate value in field</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/712697#M81582</link>
      <description>&lt;P&gt;I don't have admin rights in Splunk. Is there an easy way to enforces this in the search query?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 14:23:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-format-Duplicate-value-in-field/m-p/712697#M81582</guid>
      <dc:creator>tozaltin</dc:creator>
      <dc:date>2025-02-27T14:23:09Z</dc:date>
    </item>
  </channel>
</rss>

