<?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: help on a field rename in a subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456741#M170505</link>
    <description>&lt;P&gt;thanks to you&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2019 12:13:02 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2019-07-05T12:13:02Z</dc:date>
    <item>
      <title>help on a field rename in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456737#M170501</link>
      <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;I use the subsearch below in order to match host in host.csv with host in the index&lt;BR /&gt;
But in the index, the host field is called USERNAME&lt;BR /&gt;
So I am doing a rename in my subsearch but I am unable to match with the index events&lt;BR /&gt;
what is the problem please??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[| inputlookup host.csv 
    | table host| rename host as USERNAME ] index=A sourcetype=wireless USERNAME=TOTA
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jul 2019 08:52:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456737#M170501</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-05T08:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: help on a field rename in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456738#M170502</link>
      <description>&lt;P&gt;I think you need to place the search before the lookup, so it would look something like this&lt;/P&gt;

&lt;P&gt;index-A sourcetype=wireless USERNAME=TOTA [inputlookup host.csv | table host | rename host as USERNAME] &lt;/P&gt;

&lt;P&gt;See if that works perhaps?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 10:30:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456738#M170502</guid>
      <dc:creator>chrispounds</dc:creator>
      <dc:date>2019-07-05T10:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: help on a field rename in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456739#M170503</link>
      <description>&lt;P&gt;Hi @jip31,&lt;/P&gt;

&lt;P&gt;Maybe &lt;CODE&gt;USERNAME=TOTA&lt;/CODE&gt; is causing the problem as it only filters on TOTA. Try it as follows :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=A sourcetype=wireless   [| inputlookup host.csv | table host| rename host as USERNAME ] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to enrich your data with the lookup then this should do :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=A sourcetype=wireless  | lookup host.csv host AS USERNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 10:36:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456739#M170503</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-07-05T10:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: help on a field rename in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456740#M170504</link>
      <description>&lt;P&gt;its not working...&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 12:05:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456740#M170504</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-05T12:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: help on a field rename in a subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456741#M170505</link>
      <description>&lt;P&gt;thanks to you&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 12:13:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-a-field-rename-in-a-subsearch/m-p/456741#M170505</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-07-05T12:13:02Z</dc:date>
    </item>
  </channel>
</rss>

