<?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 we use wildcard characters in a lookup table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94520#M24381</link>
    <description>&lt;P&gt;The props/transforms is required to enable wildcard lookup against the "lookup field".  I suspect the "lookup field" need to be "lookup_field".  Don't believe that spaces are allowed in field names and may be breaking this.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2017 17:25:38 GMT</pubDate>
    <dc:creator>the_wolverine</dc:creator>
    <dc:date>2017-03-08T17:25:38Z</dc:date>
    <item>
      <title>Can we use wildcard characters in a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94513#M24374</link>
      <description>&lt;P&gt;Can I create a lookup table with wildcard character &lt;CODE&gt;*&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;I have a lookup like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;input,output
user*,USERNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so anything that comes like &lt;CODE&gt;user&lt;/CODE&gt; or &lt;CODE&gt;user1&lt;/CODE&gt; or &lt;CODE&gt;username&lt;/CODE&gt; will match &lt;CODE&gt;user*&lt;/CODE&gt; and output &lt;CODE&gt;USERNAME&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2012 10:02:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94513#M24374</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2012-07-10T10:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use wildcard characters in a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94514#M24375</link>
      <description>&lt;P&gt;You certainly can. Use the &lt;CODE&gt;match_type&lt;/CODE&gt; in transforms.conf to specify the field you want to match on as a wildcard, then populate your lookup table just like you've planned to.&lt;/P&gt;

&lt;P&gt;So something like this in props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
LOOKUP-user = userlookup user OUTPUT username
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And in transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[userlookup]
filename = userlookup.csv
match_type = WILDCARD(user)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And finally your userlookup.csv:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user,username
user*,USERNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You now should be seeing USERNAME whenever the user field has a value of something beginning with "user".&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2012 10:37:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94514#M24375</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-07-10T10:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use wildcard characters in a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94515#M24376</link>
      <description>&lt;P&gt;I know this thread is old, but I'm trying to the same thing and am stuck.  I've followed the instructions but something doesn't make sense to me. Here are my configurations:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
LOOKUP-sector = sectorlookup "Lookup Field" OUTPUT Sector
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sectorlookup]
filename = L_Sectors.csv
match_type = WILDCARD("Lookup Field")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;L_Sectors.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"Lookup Field","Sector"
"A1-A2-A3*","Sector1"
"B1-B2-B3-B4*","Sector2"
"C1-C2-C3*","Sector3"
"D1-D2-D3-D4-D5*","Sector4"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My question is: how do I structure the lookup command? Right now I have&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* | lookup L_Sectors.csv "Lookup Field" OUTPUT Sector | table "Lookup Field", Sector
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but I'm not getting results.  Am I doing the search correctly?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 21:53:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94515#M24376</guid>
      <dc:creator>andrewtrobec</dc:creator>
      <dc:date>2016-12-07T21:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use wildcard characters in a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94516#M24377</link>
      <description>&lt;P&gt;FYI - the props.conf addition is not required unless you require an automatic lookup.&lt;/P&gt;

&lt;P&gt;Just to expand on the lookup command you have proposed - I will include the default functions which are implied by your command above:&lt;/P&gt;

&lt;P&gt;I will rewrite your command above with annotations to point out notable issues:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lookup L_Sectors.csv**(1)** "Lookup Field" **(2)** OUTPUT Sector**(3)** | table "Lookup Field", Sector
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;(1)&lt;/STRONG&gt; You need to invoke the stanza which you have defined which would be:&lt;BR /&gt;
    lookup &lt;STRONG&gt;sectorlookup&lt;/STRONG&gt; etc&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;(2)&lt;/STRONG&gt; The syntax for the lookup command is:&lt;BR /&gt;
    lookup &amp;lt; lookup-table-name &amp;gt; &amp;lt; lookup-field1 &amp;gt; AS &amp;lt; event-field1 &amp;gt;&lt;/P&gt;

&lt;P&gt;If you do not specify an &amp;lt; event-field &amp;gt; then  it will default to lookup an event field with the same name as the &amp;lt; lookup-field &amp;gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;(3)&lt;/STRONG&gt; Note - if you have a field named Sector already this will will be overwritten.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2016 04:12:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94516#M24377</guid>
      <dc:creator>alexandermunce</dc:creator>
      <dc:date>2016-12-15T04:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use wildcard characters in a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94517#M24378</link>
      <description>&lt;P&gt;this is printing out all the events. even if its not matching the wildcard? any reason why ?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 17:36:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94517#M24378</guid>
      <dc:creator>VARWIZ</dc:creator>
      <dc:date>2017-01-05T17:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use wildcard characters in a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94518#M24379</link>
      <description>&lt;P&gt;I dont have access to transforms.conf. is there anyway we can do this using normal search query ?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 21:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94518#M24379</guid>
      <dc:creator>VARWIZ</dc:creator>
      <dc:date>2017-01-05T21:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use wildcard characters in a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94519#M24380</link>
      <description>&lt;P&gt;When you have a similar situation to an old question, please post a new question with a link to the old one and with the specifics of your current situation.  That will get you more, better, faster results from the community, as opposed to posting comments or answers on an older question (especially one which has been marked "answered" for LITERALLY years).&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 16:09:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94519#M24380</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-03T16:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use wildcard characters in a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94520#M24381</link>
      <description>&lt;P&gt;The props/transforms is required to enable wildcard lookup against the "lookup field".  I suspect the "lookup field" need to be "lookup_field".  Don't believe that spaces are allowed in field names and may be breaking this.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 17:25:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94520#M24381</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2017-03-08T17:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use wildcard characters in a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94521#M24382</link>
      <description>&lt;P&gt;thanks. how is this configured in GUI? As I'm doing everything in GUI so far...,&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 03:31:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94521#M24382</guid>
      <dc:creator>leonjxtan</dc:creator>
      <dc:date>2017-04-21T03:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use wildcard characters in a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94522#M24383</link>
      <description>&lt;P&gt;It looks like as of at least Splunk Version 7.0.3.4 if you go into Lookups -&amp;gt; Lookup definitions and select the "Advanced options" checkbox there's now a Match type field. I just added "WILDCARD(fieldname)" there and it worked.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 14:41:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94522#M24383</guid>
      <dc:creator>tmcmaster</dc:creator>
      <dc:date>2018-06-14T14:41:39Z</dc:date>
    </item>
  </channel>
</rss>

