<?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 How to create a lookup matching non-exact words ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292763#M88376</link>
    <description>&lt;P&gt;I have the below type of event and I want to add a category field to it using lookups&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;time    Transaction Business name
6/01/2018   40.22   ABC foods 6697    VALE  TAP AND PAY 0000
8/01/2018   45.22   supermarket suburb TAP and PAY 0000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, I created the following lookup - test.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Business name,Category
ABC foods 6697    VALE  TAP AND PAY 0000,Dine out
DEF utilities,Utilities
TARGET suburb name,Shopping
supermarket suburb TAP and PAY 0000,Groceries
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Below is my search query,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="finance" sourcetype="csv_finance" | lookup test.csv "Business name" OUTPUT Category|  table "Business name" Category
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but its not displaying the results.&lt;BR /&gt;
How can I create a successful lookup that will display the &lt;STRONG&gt;categories&lt;/STRONG&gt; along with  the &lt;STRONG&gt;business name&lt;/STRONG&gt; in the search results ?&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2018 00:07:53 GMT</pubDate>
    <dc:creator>damode</dc:creator>
    <dc:date>2018-01-10T00:07:53Z</dc:date>
    <item>
      <title>How to create a lookup matching non-exact words ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292763#M88376</link>
      <description>&lt;P&gt;I have the below type of event and I want to add a category field to it using lookups&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;time    Transaction Business name
6/01/2018   40.22   ABC foods 6697    VALE  TAP AND PAY 0000
8/01/2018   45.22   supermarket suburb TAP and PAY 0000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, I created the following lookup - test.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Business name,Category
ABC foods 6697    VALE  TAP AND PAY 0000,Dine out
DEF utilities,Utilities
TARGET suburb name,Shopping
supermarket suburb TAP and PAY 0000,Groceries
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Below is my search query,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="finance" sourcetype="csv_finance" | lookup test.csv "Business name" OUTPUT Category|  table "Business name" Category
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but its not displaying the results.&lt;BR /&gt;
How can I create a successful lookup that will display the &lt;STRONG&gt;categories&lt;/STRONG&gt; along with  the &lt;STRONG&gt;business name&lt;/STRONG&gt; in the search results ?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 00:07:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292763#M88376</guid>
      <dc:creator>damode</dc:creator>
      <dc:date>2018-01-10T00:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup matching non-exact words ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292764#M88377</link>
      <description>&lt;P&gt;Does your lookup table have the numbers at the front of the line?  It's displayed with two leading numbers, which seems to indicate the 2nd number per line is actually in your file.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 00:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292764#M88377</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-10T00:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup matching non-exact words ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292765#M88378</link>
      <description>&lt;P&gt;No, the lookup table doesnt have any numbers. Sorry, I got the formatting wrong while posting this qn. I will update it.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 00:48:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292765#M88378</guid>
      <dc:creator>damode</dc:creator>
      <dc:date>2018-01-10T00:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup matching non-exact words ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292766#M88379</link>
      <description>&lt;P&gt;It's also unclear from your posted data what the values of each field are in the event.  Is the Business Name &lt;CODE&gt;ABC foods 6697    VALE  TAP AND PAY 0000&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 00:51:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292766#M88379</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-10T00:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup matching non-exact words ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292767#M88380</link>
      <description>&lt;P&gt;Yes, thats right.&lt;BR /&gt;
the data is of bank transactions in csv file format.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 00:53:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292767#M88380</guid>
      <dc:creator>damode</dc:creator>
      <dc:date>2018-01-10T00:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup matching non-exact words ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292768#M88381</link>
      <description>&lt;P&gt;You can do wildcard matching in your lookup.  And to avoid confusion I'd use &lt;CODE&gt;_&lt;/CODE&gt; instead of  in your field names in the lookup.&lt;/P&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[test]
filename = test.csv
match_type = WILDCARD(Business_name)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;test.csv:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Business_name,Category
 ABC*,Dine out
 DEF*,Utilities
 TARGET*,Shopping
 supermarket*,Groceries
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And when searching:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="finance" sourcetype="csv_finance" | lookup test Business_name AS "Business name" OUTPUT Category|  table "Business name" Category
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jan 2018 00:55:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292768#M88381</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-10T00:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a lookup matching non-exact words ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292769#M88382</link>
      <description>&lt;P&gt;Thanks @micahkemp!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 01:56:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-lookup-matching-non-exact-words/m-p/292769#M88382</guid>
      <dc:creator>damode</dc:creator>
      <dc:date>2018-01-10T01:56:45Z</dc:date>
    </item>
  </channel>
</rss>

