<?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: Wildcards working for inputlookup but not lookup? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-working-for-inputlookup-but-not-lookup/m-p/425547#M121996</link>
    <description>&lt;P&gt;Ah, didn't realize that the UI part was a somewhat recent addition. So to get the wildcard matching for lookup command to work, I guess you'll probably need help from someone who does have the access to transforms.conf.&lt;/P&gt;

&lt;P&gt;The thing with inputlookup is that it doesn't actually match anything. In the subsearch inputlookup just creates some table and that's where any lookup specific configurations end. The filtering is done by the search command - in a search command anything in the square brackets gets expanded into a series of search terms with AND and OR operators. You can see what it actually gets expanded to with the format command: | inputlookup some_lookup | table field1 field2 field3 | head 5 | format.&lt;/P&gt;

&lt;P&gt;So if your lookup has "*" characters in it, they would simply become wildcards in a search command, and the match_type is never even used. Which is why your first search works correctly.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jul 2018 06:18:05 GMT</pubDate>
    <dc:creator>janispelss</dc:creator>
    <dc:date>2018-07-04T06:18:05Z</dc:date>
    <item>
      <title>Wildcards working for inputlookup but not lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-working-for-inputlookup-but-not-lookup/m-p/425544#M121993</link>
      <description>&lt;P&gt;Been targeting the same lookup definition and my &lt;CODE&gt;lookup&lt;/CODE&gt; just refuses to recognize wildcards in my lookup table. My &lt;CODE&gt;inputlookup&lt;/CODE&gt; works like so and properly accounts for the wildcards:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search NOT [|inputlookup bad_columns | table SCAN_TYPE TABLE NAME SINGLE_COLUMN]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My &lt;CODE&gt;lookup&lt;/CODE&gt; is below and just doesn't work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;foreach Column* [lookup bad_columns SCAN_TYPE AS SCAN_TYPE TABLE_NAME AS TABLE_NAME SINGLE_COLUMN AS &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; OUTPUT SINGLE_COLUMN as match | various other evals...]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not sure if the &lt;CODE&gt;&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;&lt;/CODE&gt; rename is allowed or if match_type can vary between these two commands. I do not have access to transforms.conf, FYI.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 12:39:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-working-for-inputlookup-but-not-lookup/m-p/425544#M121993</guid>
      <dc:creator>jpawloski</dc:creator>
      <dc:date>2018-07-03T12:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards working for inputlookup but not lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-working-for-inputlookup-but-not-lookup/m-p/425545#M121994</link>
      <description>&lt;P&gt;Did you set the match type to WILDCARD for your lookup? If not, then to get this working through the web UI go to Settings -&amp;gt; Lookups -&amp;gt; Lookup definitions. Find your lookup there, and in it's advanced options in the "Match type" field add WILDCARD(your_field) for any fields that you want to enable wildcard matching with. In your case I guess it would be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;WILDCARD(SCAN_TYPE), WILDCARD(TABLE_NAME), WILDCARD(SINGLE_COLUMN)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should allow the &lt;EM&gt;lookup&lt;/EM&gt; command to correctly match using wildcards.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 14:03:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-working-for-inputlookup-but-not-lookup/m-p/425545#M121994</guid>
      <dc:creator>janispelss</dc:creator>
      <dc:date>2018-07-03T14:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards working for inputlookup but not lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-working-for-inputlookup-but-not-lookup/m-p/425546#M121995</link>
      <description>&lt;P&gt;I'm on Splunk 6.2 so I do not have this option. But are you saying lookups and inputlookups can have different match_types?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 14:30:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-working-for-inputlookup-but-not-lookup/m-p/425546#M121995</guid>
      <dc:creator>jpawloski</dc:creator>
      <dc:date>2018-07-03T14:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards working for inputlookup but not lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wildcards-working-for-inputlookup-but-not-lookup/m-p/425547#M121996</link>
      <description>&lt;P&gt;Ah, didn't realize that the UI part was a somewhat recent addition. So to get the wildcard matching for lookup command to work, I guess you'll probably need help from someone who does have the access to transforms.conf.&lt;/P&gt;

&lt;P&gt;The thing with inputlookup is that it doesn't actually match anything. In the subsearch inputlookup just creates some table and that's where any lookup specific configurations end. The filtering is done by the search command - in a search command anything in the square brackets gets expanded into a series of search terms with AND and OR operators. You can see what it actually gets expanded to with the format command: | inputlookup some_lookup | table field1 field2 field3 | head 5 | format.&lt;/P&gt;

&lt;P&gt;So if your lookup has "*" characters in it, they would simply become wildcards in a search command, and the match_type is never even used. Which is why your first search works correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jul 2018 06:18:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wildcards-working-for-inputlookup-but-not-lookup/m-p/425547#M121996</guid>
      <dc:creator>janispelss</dc:creator>
      <dc:date>2018-07-04T06:18:05Z</dc:date>
    </item>
  </channel>
</rss>

