<?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: Fields search doesn't work when filtering internal fields in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69253#M14033</link>
    <description>&lt;P&gt;I'm just a noob but I think the results of the search will be "ORDERID=2646042148." If you need to pass just "2646042148" you might need to rename the ORDERID field to query and return just that. I think I read this on post Ayn responded to once. Your query (subquery actually) would be something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ MissingUserData exchange rate | rex "ID :(?&amp;lt;ORDERID&amp;gt;.+)" | rename ORDERID as query | fields query ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I did that for a query where I was looking up IPs in a lookup table and throwing them against some very unstructured data. My query was as follows where the column name in test2.csv was IP. This does impact search performance and like I said I'm a noob so in the interest of full disclosure YMMV &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=netflow [| inputlookup test2.csv | rename IP as query | fields query ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note the following link: &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.4/User/HowSubsearchesWork"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.4/User/HowSubsearchesWork&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Sep 2012 17:02:27 GMT</pubDate>
    <dc:creator>Runals</dc:creator>
    <dc:date>2012-09-25T17:02:27Z</dc:date>
    <item>
      <title>Fields search doesn't work when filtering internal fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69250#M14030</link>
      <description>&lt;P&gt;Here is the search string:&lt;/P&gt;

&lt;P&gt;MissingUserData exchange rate | rex "ID :(?&lt;ORDERID&gt;.+)" | fields ORDERID&lt;/ORDERID&gt;&lt;/P&gt;

&lt;P&gt;This returns 8 records on a specific time frame. But it returns the whole log string.&lt;/P&gt;

&lt;P&gt;If I add " | fields - _*" &lt;/P&gt;

&lt;P&gt;to only get the values of ORDERID in the results like this:&lt;/P&gt;

&lt;P&gt;MissingUserData exchange rate | rex "ID :(?&lt;ORDERID&gt;.+)" | fields ORDERID | fields - _*&lt;/ORDERID&gt;&lt;/P&gt;

&lt;P&gt;I get nothing.&lt;/P&gt;

&lt;P&gt;That behavior just baffles me. Anyone has an idea why that might be?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 00:17:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69250#M14030</guid>
      <dc:creator>sansay</dc:creator>
      <dc:date>2012-09-25T00:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Fields search doesn't work when filtering internal fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69251#M14031</link>
      <description>&lt;P&gt;"The whole log string" is stored in the field &lt;CODE&gt;_raw&lt;/CODE&gt;, so when you do &lt;CODE&gt;| fields - _*&lt;/CODE&gt; you're removing that field as well, which is why you're not seeing any events - you should only be seeing your values for &lt;CODE&gt;ORDERID&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 06:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69251#M14031</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-09-25T06:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Fields search doesn't work when filtering internal fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69252#M14032</link>
      <description>&lt;P&gt;Here is a sample log that shows up, instead of just giving me the values for ORDERID:&lt;BR /&gt;
2012-02-06T03:07:54.739-08:00 lvp-p2-nppaysys01 BibitServer[9081]: WARNING: LogCategory [MissingUserData] No exchange rate for Order ID :2646042148&lt;/P&gt;

&lt;P&gt;Note that I can get only ORDERID values displayed with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MissingUserData exchange rate | rex "ID :(?&amp;lt;ORDERID&amp;gt;.+)" | fields ORDERID | table ORDERID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But then I can't use that to feed it to another search, as it fails.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 16:23:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69252#M14032</guid>
      <dc:creator>sansay</dc:creator>
      <dc:date>2012-09-25T16:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Fields search doesn't work when filtering internal fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69253#M14033</link>
      <description>&lt;P&gt;I'm just a noob but I think the results of the search will be "ORDERID=2646042148." If you need to pass just "2646042148" you might need to rename the ORDERID field to query and return just that. I think I read this on post Ayn responded to once. Your query (subquery actually) would be something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ MissingUserData exchange rate | rex "ID :(?&amp;lt;ORDERID&amp;gt;.+)" | rename ORDERID as query | fields query ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I did that for a query where I was looking up IPs in a lookup table and throwing them against some very unstructured data. My query was as follows where the column name in test2.csv was IP. This does impact search performance and like I said I'm a noob so in the interest of full disclosure YMMV &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=netflow [| inputlookup test2.csv | rename IP as query | fields query ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note the following link: &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.4/User/HowSubsearchesWork"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.4/User/HowSubsearchesWork&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 17:02:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69253#M14033</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2012-09-25T17:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Fields search doesn't work when filtering internal fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69254#M14034</link>
      <description>&lt;P&gt;Thank you Runals. You hit it on the nail with your answer.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 18:26:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fields-search-doesn-t-work-when-filtering-internal-fields/m-p/69254#M14034</guid>
      <dc:creator>sansay</dc:creator>
      <dc:date>2012-09-25T18:26:41Z</dc:date>
    </item>
  </channel>
</rss>

