<?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: Ingesting JSON data via a python script, why are fields with numeric values indexed as multivalue fields with two identical values? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121140#M25151</link>
    <description>&lt;P&gt;That is a good possibility. Would we see a similar mechanic if sourcetype=json (auto-sourcetyping) or a transforms call from props on an indexer?  What are your thoughts on index time extractions vs search time? &lt;/P&gt;</description>
    <pubDate>Sun, 06 Sep 2015 18:48:23 GMT</pubDate>
    <dc:creator>landen99</dc:creator>
    <dc:date>2015-09-06T18:48:23Z</dc:date>
    <item>
      <title>Ingesting JSON data via a python script, why are fields with numeric values indexed as multivalue fields with two identical values?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121137#M25148</link>
      <description>&lt;P&gt;I have a json file with entries in the following form:&lt;BR /&gt;
&lt;CODE&gt;{ "ABC" : "XYZ" , "DEF" : 123 ,  "GHI" : "456" , ... }&lt;/CODE&gt;&lt;BR /&gt;
There are about 15 or so variables defined in a single json formatted line with multiple lines for a given output.&lt;/P&gt;

&lt;P&gt;Splunk picks up the output via a python script which essentially prints everything to stdout.&lt;/P&gt;

&lt;P&gt;The issue I'm having is that, when Splunk ingests the data, some of the fields end up being multivalued where a field has two identical values. I can see this occurring when I click on the "show as raw text" in the splunk search results.&lt;/P&gt;

&lt;P&gt;Somewhat interesting is that these fields are all fields with numerical values in them. So it's occurring for both &lt;CODE&gt;"DEF": 123  and "GHI" : "456"&lt;/CODE&gt; types..&lt;/P&gt;

&lt;P&gt;Any ideas as to what could be causing this issue?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 04:22:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121137#M25148</guid>
      <dc:creator>splunknewby</dc:creator>
      <dc:date>2015-07-14T04:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting JSON data via a python script, why are fields with numeric values indexed as multivalue fields with two identical values?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121138#M25149</link>
      <description>&lt;P&gt;Are there multiple entries of "ABC" : "123" , for example?  If so, that would explain it.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2015 15:05:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121138#M25149</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2015-09-06T15:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting JSON data via a python script, why are fields with numeric values indexed as multivalue fields with two identical values?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121139#M25150</link>
      <description>&lt;P&gt;Your problem is probably the same as this:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/301165/splunk-app-for-aws-billing-why-is-a-single-entry-o.html#answer-301297"&gt;http://answers.splunk.com/answers/301165/splunk-app-for-aws-billing-why-is-a-single-entry-o.html#answer-301297&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You are probably telling Splunk to extract JSON fields twice: once at index time ( &lt;CODE&gt;INDEXED_EXTRACTIONS=json&lt;/CODE&gt; ) and once at search time ( &lt;CODE&gt;KV_MODE=json&lt;/CODE&gt; ). Get rid of the &lt;CODE&gt;KV_MODE&lt;/CODE&gt; setting.&lt;/P&gt;

&lt;P&gt;See this Q&amp;amp;A for a more complete discussion:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/174939/why-are-my-json-fields-extracted-twice.html"&gt;http://answers.splunk.com/answers/174939/why-are-my-json-fields-extracted-twice.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2015 18:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121139#M25150</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-06T18:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting JSON data via a python script, why are fields with numeric values indexed as multivalue fields with two identical values?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121140#M25151</link>
      <description>&lt;P&gt;That is a good possibility. Would we see a similar mechanic if sourcetype=json (auto-sourcetyping) or a transforms call from props on an indexer?  What are your thoughts on index time extractions vs search time? &lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2015 18:48:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121140#M25151</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2015-09-06T18:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting JSON data via a python script, why are fields with numeric values indexed as multivalue fields with two identical values?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121141#M25152</link>
      <description>&lt;P&gt;Yes.  For JSON, the events are fairly useless without extracting them so you are way better off doing it once for everybody at Index time rather than for every search (unless you have HUGE numbers of events that are rarely searched).&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2015 21:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-JSON-data-via-a-python-script-why-are-fields-with/m-p/121141#M25152</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-06T21:03:49Z</dc:date>
    </item>
  </channel>
</rss>

