<?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 field value substitution props.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203781#M40235</link>
    <description>&lt;P&gt;I would like to transform some date fields in my file when indexing:&lt;BR /&gt;
basically my file is a csv one and one line event looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"","Value1","Value2","","","","20160326"...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to tranform my date like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;26/03/2016
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I succeed with &lt;CODE&gt;SEDCMD&lt;/CODE&gt; and this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;s/((.*?),){7}([0-9]{4})(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1]))/\1\5\/\4\/\3/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, when I'm doing some search, field values in the window have the new date format, but have the old date format when I select field in the left column( with &lt;CODE&gt;selected fields&lt;/CODE&gt; and &lt;CODE&gt;interesting fields&lt;/CODE&gt;)&lt;/P&gt;

&lt;P&gt;I guess I misunderstand something relating with index-time and search-time, like my modification is not persistent at search-time.&lt;BR /&gt;
Anyone can help?&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2016 09:41:22 GMT</pubDate>
    <dc:creator>MaryvonneMB</dc:creator>
    <dc:date>2016-06-13T09:41:22Z</dc:date>
    <item>
      <title>field value substitution props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203781#M40235</link>
      <description>&lt;P&gt;I would like to transform some date fields in my file when indexing:&lt;BR /&gt;
basically my file is a csv one and one line event looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"","Value1","Value2","","","","20160326"...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to tranform my date like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;26/03/2016
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I succeed with &lt;CODE&gt;SEDCMD&lt;/CODE&gt; and this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;s/((.*?),){7}([0-9]{4})(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1]))/\1\5\/\4\/\3/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, when I'm doing some search, field values in the window have the new date format, but have the old date format when I select field in the left column( with &lt;CODE&gt;selected fields&lt;/CODE&gt; and &lt;CODE&gt;interesting fields&lt;/CODE&gt;)&lt;/P&gt;

&lt;P&gt;I guess I misunderstand something relating with index-time and search-time, like my modification is not persistent at search-time.&lt;BR /&gt;
Anyone can help?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 09:41:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203781#M40235</guid>
      <dc:creator>MaryvonneMB</dc:creator>
      <dc:date>2016-06-13T09:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: field value substitution props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203782#M40236</link>
      <description>&lt;P&gt;After you added the SEDCMD line to props.conf, did you purge the the existing events from the index? &lt;/P&gt;

&lt;P&gt;SEDCMD is an index time operations which means it would not be retroactive. Any events added to Splunk from before the configuration was added would contain the old date format which could be causing the left column to show the old format.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2016 15:27:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203782#M40236</guid>
      <dc:creator>craigv_splunk</dc:creator>
      <dc:date>2016-06-13T15:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: field value substitution props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203783#M40237</link>
      <description>&lt;P&gt;I suspect that you have 2 different solutions in place.&lt;/P&gt;

&lt;P&gt;When you use &lt;CODE&gt;SEDCMD&lt;/CODE&gt;, then it changes the raw data before it is indexed and the original text is NEVER THERE so it cannot show up the way that you are describing.&lt;/P&gt;

&lt;P&gt;You might also have another solution, (a search-time one) in place that is probably working on pre-SEDCMD events.&lt;BR /&gt;
This is the correct approach because events that were indexed before &lt;CODE&gt;SEDCMD&lt;/CODE&gt; was in place will not be touched by the &lt;CODE&gt;SEDCMD&lt;/CODE&gt; solution.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 00:54:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203783#M40237</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-14T00:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: field value substitution props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203784#M40238</link>
      <description>&lt;P&gt;I think you're right because I tested SEDCMD several times and at first I didn't purge the index&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 07:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203784#M40238</guid>
      <dc:creator>MaryvonneMB</dc:creator>
      <dc:date>2016-06-14T07:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: field value substitution props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203785#M40239</link>
      <description>&lt;P&gt;Thanks for your answer. Reading Splunk doc a little more I find that it's better to make these kind of transformations at search-time instead of index-time because at index-time it could decrease the indexer performance. In fact we create a csv file using different csv sources with a SPL query. First we wanted to format date after this csv creation (when we'll index this csv)&lt;BR /&gt;
I try and rex command works great with very little negative impact on execution time when I'm created my file (22sc without rex for 170,000 lines, 25sc with rex modifications)&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 07:42:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/field-value-substitution-props-conf/m-p/203785#M40239</guid>
      <dc:creator>MaryvonneMB</dc:creator>
      <dc:date>2016-06-14T07:42:27Z</dc:date>
    </item>
  </channel>
</rss>

