<?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: override field with transforms.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-field-with-transforms-conf/m-p/644728#M109732</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have found an alternative way using FIELDALIAS. If there is a better way to do it, I appreciate the help:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;props.conf:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mysourcetype]
FIELDALIAS-field2_mv_as_field2= field2_mv AS field2
KV_MODE = None
REPORT-extract_key_value = extract_key_value
REPORT-extract_mv_fields = field2
SHOULD_LINEMERGE = false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[extract_key_value]
FORMAT = $1::$2
REGEX = fieldname.([^=]+)=([^\,]+)

[field2]
SOURCE_KEY = field2
MV_ADD = 1
FORMAT = field2_mv::$1
REGEX = ([^\s]+):&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 26 May 2023 10:35:27 GMT</pubDate>
    <dc:creator>rafadvega</dc:creator>
    <dc:date>2023-05-26T10:35:27Z</dc:date>
    <item>
      <title>How to override field with transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-field-with-transforms-conf/m-p/644683#M109728</link>
      <description>&lt;P&gt;I have a sourcetype with events like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fieldname.field1=value1,fieldname.field2=value1 value2 value3 value4,fieldname.field3=value1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To extract the fields, I use the following transformation which works correctly:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[extract_key_value]
FORMAT = $1::$2
REGEX = fieldname.([^=]+)=([^\,]+)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The field2, I want to convert it into a multivalue field by splitting it on spaces. If I do the following, it works correctly:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[field2]
SOURCE_KEY = field2
MV_ADD = 1
FORMAT = field_test::$1
REGEX = ([^\s]+):&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if I try to overwrite the field, it doesn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[field2]
SOURCE_KEY = field2
MV_ADD = 1
FORMAT = field2::$1
REGEX = ([^\s]+):&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What could be my mistake?&lt;BR /&gt;Thank you in advance&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;PD:&lt;/P&gt;
&lt;P&gt;My props.conf:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[mysourcetype]
KV_MODE = None
REPORT-extract_key_value = extract_key_value
REPORT-extract_mv_fields = field2
SHOULD_LINEMERGE = false&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 12:22:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-field-with-transforms-conf/m-p/644683#M109728</guid>
      <dc:creator>rafadvega</dc:creator>
      <dc:date>2023-05-26T12:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: override field with transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-field-with-transforms-conf/m-p/644728#M109732</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have found an alternative way using FIELDALIAS. If there is a better way to do it, I appreciate the help:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;props.conf:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mysourcetype]
FIELDALIAS-field2_mv_as_field2= field2_mv AS field2
KV_MODE = None
REPORT-extract_key_value = extract_key_value
REPORT-extract_mv_fields = field2
SHOULD_LINEMERGE = false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[extract_key_value]
FORMAT = $1::$2
REGEX = fieldname.([^=]+)=([^\,]+)

[field2]
SOURCE_KEY = field2
MV_ADD = 1
FORMAT = field2_mv::$1
REGEX = ([^\s]+):&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 May 2023 10:35:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-field-with-transforms-conf/m-p/644728#M109732</guid>
      <dc:creator>rafadvega</dc:creator>
      <dc:date>2023-05-26T10:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: override field with transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-field-with-transforms-conf/m-p/644733#M109733</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;This is quite interesting case ,-) Obviously at least docs needs information that you cannot use fieldX as target. You should leave note on docs about this.&lt;/P&gt;&lt;P&gt;Another way to do this is follow&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.4/Knowledge/Searchtimeoperationssequence" target="_self"&gt;The sequence of search-time operations&lt;/A&gt;&amp;nbsp;which shows the order of applied actions and select how you can get work around for this.&lt;/P&gt;&lt;P&gt;Another way to do this is use calculated field.&lt;/P&gt;&lt;P&gt;Add this to your sourcetype definition. This can do via conf file or via GUI&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mysourcetype]
REPORT-extract_key_value = extract_key_value
EVAL-field2 = split(field2, " ")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and keep your transformation as earlier&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[extract_key_value]
FORMAT = $1::$2
REGEX = fieldname.([^=]+)=([^\,]+)&lt;/LI-CODE&gt;&lt;P&gt;This way there shouldn't any additional fields on your field list.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 11:16:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-field-with-transforms-conf/m-p/644733#M109733</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-05-26T11:16:53Z</dc:date>
    </item>
  </channel>
</rss>

