<?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: Can I override two keys in one transforms stanza? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275442#M52829</link>
    <description>&lt;P&gt;Your &lt;CODE&gt;transforms.conf&lt;/CODE&gt; is fine but use this &lt;CODE&gt;props.conf&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_input]
MAX_TIMESTAMP_LOOKAHEAD=30
TRANSFORMS-override-index = override-ldc, override-jrc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 05 Apr 2016 16:06:52 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2016-04-05T16:06:52Z</dc:date>
    <item>
      <title>Can I override two keys in one transforms stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275441#M52828</link>
      <description>&lt;P&gt;My current situation is that a bunch of files are all being dumped into one directory for the forwarder to  monitor and send to the indexers.  Based on a field in the data, I route the events to different indexes.  These are the current props.conf and transforms.conf which are working.&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_input]
MAX_TIMESTAMP_LOOKAHEAD=30
...
TRANSFORMS-override-ldc=override-ldc
TRANSFORMS-override-jrc=override-jrc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [override-ldc]
    SOURCE_KEY=_raw
    DEST_KEY=_MetaData:Index
    REGEX=fieldname\"\s*:\s*\"LDC.*
    FORMAT=foo_ldc

    [override-jrc]
    SOURCE_KEY=_raw
    DEST_KEY=_MetaData:Index
    REGEX=fieldname\"\s*:\s*\"JRC.*
    FORMAT=foo_jrc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I also need to override the value for the source field based on the exact same REGEX.  Can I use the same transforms stanza to update 2 metadata fields, or do I need to have a second transform which uses the same REGEX but overrides source rather than index?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 15:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275441#M52828</guid>
      <dc:creator>lyndac</dc:creator>
      <dc:date>2016-04-05T15:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can I override two keys in one transforms stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275442#M52829</link>
      <description>&lt;P&gt;Your &lt;CODE&gt;transforms.conf&lt;/CODE&gt; is fine but use this &lt;CODE&gt;props.conf&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_input]
MAX_TIMESTAMP_LOOKAHEAD=30
TRANSFORMS-override-index = override-ldc, override-jrc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Apr 2016 16:06:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275442#M52829</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-04-05T16:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can I override two keys in one transforms stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275443#M52830</link>
      <description>&lt;P&gt;You would've to add different transforms stanza to override Index and source as the DEST_KEY accepts only single fields.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 16:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275443#M52830</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-04-05T16:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can I override two keys in one transforms stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275444#M52831</link>
      <description>&lt;P&gt;So by listing the tranforms in one line, does that impact the way splunk executes the transforms?  Is there a performance impact?  I guess I'm asking why one line instead of two?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 17:55:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275444#M52831</guid>
      <dc:creator>lyndac</dc:creator>
      <dc:date>2016-04-05T17:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can I override two keys in one transforms stanza?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275445#M52832</link>
      <description>&lt;P&gt;Only &lt;EM&gt;very&lt;/EM&gt; slight improvement but it is better because it is most clear/correct.  You can also more easily control which one comes first by the order in the list.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 18:06:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-override-two-keys-in-one-transforms-stanza/m-p/275445#M52832</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-04-05T18:06:41Z</dc:date>
    </item>
  </channel>
</rss>

