<?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 Spath and Rename in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Spath-and-Rename/m-p/358932#M106089</link>
    <description>&lt;P&gt;Hi, I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;I'm trying to create a query which extracts given values using 'spath'.&lt;/P&gt;

&lt;P&gt;This is what I've come up with so far:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| multisearch
[ search `cc-frontend_wmf(cCurrentYearIncome)`]
[ search `cc-frontend_wmf(pCurrentYearIncome)`]
| spath output=claimant path=detail.cCurrentYearIncome
| spath output=partner path=detail.pCurrentYearIncome
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can create the "claimant" and "partner" fields, but I then need to perform a rename and this is where I have the problem because the fields I need to rename have the same name as shown below.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;field=claim&lt;/STRONG&gt; need to rename currentIncome.employmentIncome as ccurrent&lt;BR /&gt;
&lt;STRONG&gt;field=part&lt;/STRONG&gt; need to rename currentIncome.employmentIncome as pcurrent&lt;/P&gt;

&lt;P&gt;Could someone tell me please is there a way to differentiate the two fields ie. is there a way to rename when I create the spath?&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2017 08:22:52 GMT</pubDate>
    <dc:creator>IRHM73</dc:creator>
    <dc:date>2017-06-20T08:22:52Z</dc:date>
    <item>
      <title>Spath and Rename</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Spath-and-Rename/m-p/358932#M106089</link>
      <description>&lt;P&gt;Hi, I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;I'm trying to create a query which extracts given values using 'spath'.&lt;/P&gt;

&lt;P&gt;This is what I've come up with so far:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| multisearch
[ search `cc-frontend_wmf(cCurrentYearIncome)`]
[ search `cc-frontend_wmf(pCurrentYearIncome)`]
| spath output=claimant path=detail.cCurrentYearIncome
| spath output=partner path=detail.pCurrentYearIncome
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can create the "claimant" and "partner" fields, but I then need to perform a rename and this is where I have the problem because the fields I need to rename have the same name as shown below.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;field=claim&lt;/STRONG&gt; need to rename currentIncome.employmentIncome as ccurrent&lt;BR /&gt;
&lt;STRONG&gt;field=part&lt;/STRONG&gt; need to rename currentIncome.employmentIncome as pcurrent&lt;/P&gt;

&lt;P&gt;Could someone tell me please is there a way to differentiate the two fields ie. is there a way to rename when I create the spath?&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 08:22:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Spath-and-Rename/m-p/358932#M106089</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2017-06-20T08:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Spath and Rename</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Spath-and-Rename/m-p/358933#M106090</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've fixed the issue by using the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| spath output=current input=detail.cCurrentYearIncome path=currentIncome.employmentIncome
| spath output=pcurrent input=detail.pCurrentYearIncome path=currentIncome.employmentIncome
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Many thanks&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 09:58:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Spath-and-Rename/m-p/358933#M106090</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2017-06-20T09:58:04Z</dc:date>
    </item>
  </channel>
</rss>

