<?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 Can you rename fields that were automatically extracted with KV_mode=auto using transformations? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-rename-fields-that-were-automatically-extracted-with-KV/m-p/251498#M48417</link>
    <description>&lt;P&gt;If I have Key-Value pair events and fields that are automatically extracted with &lt;CODE&gt;KV_MODE=auto&lt;/CODE&gt; in props.conf, can I apply a field transformation to an extracted field? &lt;/P&gt;

&lt;P&gt;For example, I have a field UserName that appears in the raw events like (e.g., ... UserName="ryan" ...).  I want a field &lt;STRONG&gt;user&lt;/STRONG&gt; to appear at search-time, but I don't want to use and EVAL- or a FIELDALIAS- clause in props.conf, because I don't to overload the server and how it looks for fields (see &lt;A href="https://splunkbase.splunk.com/app/2871/"&gt;https://splunkbase.splunk.com/app/2871/&lt;/A&gt; and explanation about how litsearch works).  &lt;/P&gt;

&lt;P&gt;I have tried using this in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_src_type]
KV_MODE = auto
REPORT-extractions = RenameUser,ExtractSessionType
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the following in transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[RenameUser]
SOURCE_KEY = UserName
REGEX = (.+)
FORMAT = user::"$1"
[ExtractSessionType]
REGEX = SessionName="(?&amp;lt;SessionType&amp;gt;\w+(-\w+)*)\S*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The "SessionType" field extractions from the "SessionName" field are successful, but the "UserName" field is never renamed to "user".&lt;/P&gt;

&lt;P&gt;Is this possible with the Key-Value extractions being applied first?&lt;/P&gt;

&lt;P&gt;I have looked in the job inspector and found no mention of errors or issues.&lt;/P&gt;</description>
    <pubDate>Mon, 16 May 2016 22:39:43 GMT</pubDate>
    <dc:creator>rjthibod</dc:creator>
    <dc:date>2016-05-16T22:39:43Z</dc:date>
    <item>
      <title>Can you rename fields that were automatically extracted with KV_mode=auto using transformations?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-rename-fields-that-were-automatically-extracted-with-KV/m-p/251498#M48417</link>
      <description>&lt;P&gt;If I have Key-Value pair events and fields that are automatically extracted with &lt;CODE&gt;KV_MODE=auto&lt;/CODE&gt; in props.conf, can I apply a field transformation to an extracted field? &lt;/P&gt;

&lt;P&gt;For example, I have a field UserName that appears in the raw events like (e.g., ... UserName="ryan" ...).  I want a field &lt;STRONG&gt;user&lt;/STRONG&gt; to appear at search-time, but I don't want to use and EVAL- or a FIELDALIAS- clause in props.conf, because I don't to overload the server and how it looks for fields (see &lt;A href="https://splunkbase.splunk.com/app/2871/"&gt;https://splunkbase.splunk.com/app/2871/&lt;/A&gt; and explanation about how litsearch works).  &lt;/P&gt;

&lt;P&gt;I have tried using this in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_src_type]
KV_MODE = auto
REPORT-extractions = RenameUser,ExtractSessionType
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the following in transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[RenameUser]
SOURCE_KEY = UserName
REGEX = (.+)
FORMAT = user::"$1"
[ExtractSessionType]
REGEX = SessionName="(?&amp;lt;SessionType&amp;gt;\w+(-\w+)*)\S*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The "SessionType" field extractions from the "SessionName" field are successful, but the "UserName" field is never renamed to "user".&lt;/P&gt;

&lt;P&gt;Is this possible with the Key-Value extractions being applied first?&lt;/P&gt;

&lt;P&gt;I have looked in the job inspector and found no mention of errors or issues.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2016 22:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-rename-fields-that-were-automatically-extracted-with-KV/m-p/251498#M48417</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2016-05-16T22:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can you rename fields that were automatically extracted with KV_mode=auto using transformations?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-rename-fields-that-were-automatically-extracted-with-KV/m-p/251499#M48418</link>
      <description>&lt;P&gt;My own experimenting seems to say that using "EXTRACT-" clauses won't work either.  I am guessing this has to do with the use of KV_MODE being set to "auto". I am probably abandoning it for now, but would welcome any response from someone that can give a definitive answer.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 01:50:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-rename-fields-that-were-automatically-extracted-with-KV/m-p/251499#M48418</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2016-05-17T01:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can you rename fields that were automatically extracted with KV_mode=auto using transformations?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-rename-fields-that-were-automatically-extracted-with-KV/m-p/251500#M48419</link>
      <description>&lt;P&gt;The only way to do what you are asking (and I would not do it) is to change it in the raw event using &lt;CODE&gt;SEDCMD&lt;/CODE&gt;.  Check it out here:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Anonymizedatausingconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;IMHO, the proper policy should be that it is OK to have one alias per field but ONLY one (preferably none).  The exploding litsearch is a problem but Splunk is aggressively working on it and it isn't (usually) as bad as it seems (except for with ES).&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2016 14:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-rename-fields-that-were-automatically-extracted-with-KV/m-p/251500#M48419</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-29T14:13:05Z</dc:date>
    </item>
  </channel>
</rss>

