<?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 How to decompress a single field (compressed JSON file) given the data has already been indexed in Splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-decompress-a-single-field-compressed-JSON-file-given-the/m-p/263927#M50645</link>
    <description>&lt;P&gt;We have a compressed (via python zlib) JSON file that is "chunked" prior to being indexed by Splunk.&lt;/P&gt;

&lt;P&gt;The multiple events in Splunk (once indexed) can be pieced together (via Splunk's transaction command) yielding one event, containing multiple fields, one of which contains the compressed JSON file.&lt;/P&gt;

&lt;P&gt;How do we decompress this one field in Splunk given the data has already been indexed? &lt;/P&gt;

&lt;P&gt;(Decompressing earlier in the process, like during indexing, doesn't seem reasonable because data arrives in pieces due to various size limitations.)&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2016 16:21:43 GMT</pubDate>
    <dc:creator>morin</dc:creator>
    <dc:date>2016-09-01T16:21:43Z</dc:date>
    <item>
      <title>How to decompress a single field (compressed JSON file) given the data has already been indexed in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-decompress-a-single-field-compressed-JSON-file-given-the/m-p/263927#M50645</link>
      <description>&lt;P&gt;We have a compressed (via python zlib) JSON file that is "chunked" prior to being indexed by Splunk.&lt;/P&gt;

&lt;P&gt;The multiple events in Splunk (once indexed) can be pieced together (via Splunk's transaction command) yielding one event, containing multiple fields, one of which contains the compressed JSON file.&lt;/P&gt;

&lt;P&gt;How do we decompress this one field in Splunk given the data has already been indexed? &lt;/P&gt;

&lt;P&gt;(Decompressing earlier in the process, like during indexing, doesn't seem reasonable because data arrives in pieces due to various size limitations.)&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 16:21:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-decompress-a-single-field-compressed-JSON-file-given-the/m-p/263927#M50645</guid>
      <dc:creator>morin</dc:creator>
      <dc:date>2016-09-01T16:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to decompress a single field (compressed JSON file) given the data has already been indexed in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-decompress-a-single-field-compressed-JSON-file-given-the/m-p/263928#M50646</link>
      <description>&lt;P&gt;While Splunk uses zlib for compression internally, that not something made available via commands out of the box. &lt;/P&gt;

&lt;P&gt;That said, it does make sense to &lt;EM&gt;decompress&lt;/EM&gt; the data before indexing (as a pre-process) since on the whole it will ALL be compressed again through the indexing process, using the same methodology that you use. &lt;/P&gt;

&lt;P&gt;All indexed data is stored as compressed data (and usually sits on disk taking up 30%-70% less room than the raw data).&lt;/P&gt;

&lt;P&gt;The other option is for you and yours to create a command that will take input (a field, in line) and run it through a decompression using zlib in a python script. &lt;A href="http://dev.splunk.com/view/python-sdk/SP-CAAAEU2"&gt;you can read about that here&lt;/A&gt; feeding the output back to Splunk where you can use it.&lt;/P&gt;

&lt;P&gt;You have not mentioned any specifics regarding why your data "arrives in pieces due to various size limitations", so it's difficult to say whether these suggestions are viable for you.&lt;/P&gt;

&lt;P&gt;The least complicated solution would be to create a &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/AdvancedDev/ScriptedInputsIntro"&gt;scripted input&lt;/A&gt; (in python, if you like) that decompresses the data as it feeds it to the indexer. (which will, in turn compress and make it available to you simultaneously)&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 16:39:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-decompress-a-single-field-compressed-JSON-file-given-the/m-p/263928#M50646</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2016-09-01T16:39:06Z</dc:date>
    </item>
  </channel>
</rss>

