<?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: How do you lookup matching numbers by values regardless of formats? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376386#M110497</link>
    <description>&lt;P&gt;Thank you for answer. But my problem is these lookup files's key formats are various, so even I change the source file's format to uniform, I still can't match successfully with different formatted lookup files. &lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2019 15:10:42 GMT</pubDate>
    <dc:creator>xshen_anji</dc:creator>
    <dc:date>2019-03-29T15:10:42Z</dc:date>
    <item>
      <title>How do you lookup matching numbers by values regardless of formats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376384#M110495</link>
      <description>&lt;P&gt;I have a lookup table, mylookup.csv, such as: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Key, Value
3, 30
4, 45
5, 52
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have a CSV source mysource.csv, as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourceKey, Otherthings
3.0, 300
4.0, 400
5.0, 500
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I do a search like: &lt;CODE&gt;source=mysource.csv | lookup mylookup.csv Key as sourceKey OUPUT Value&lt;/CODE&gt;&lt;BR /&gt;
This gives nothing. But if I change my lookup table's Key's format as 3.0, 4.0, etc, it could give results.&lt;/P&gt;

&lt;P&gt;My question is if there is a way I can lookup and match number fields by their values, regardless of the the formats, whether there are trailing .0s. My situation is my customer would provide these lookup files with different formats(with or without .0s), I would accommodate all these situations. &lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 13:52:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376384#M110495</guid>
      <dc:creator>xshen_anji</dc:creator>
      <dc:date>2019-03-29T13:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup matching numbers by values regardless of formats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376385#M110496</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;If you have only one type of format like with or without &lt;CODE&gt;.&lt;/CODE&gt; (dot) then you can try below query. In below query rex will remove dot and any digit after dot from &lt;CODE&gt;sourceKey&lt;/CODE&gt; field so it will match with &lt;CODE&gt;Key&lt;/CODE&gt; field from mylookup.csv file.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup mysource.csv
| rex field=sourceKey mode=sed "s/\.\d+//g"
| lookup mylookup.csv Key as sourceKey OUTPUT Value as Value
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376385#M110496</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-03-29T15:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup matching numbers by values regardless of formats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376386#M110497</link>
      <description>&lt;P&gt;Thank you for answer. But my problem is these lookup files's key formats are various, so even I change the source file's format to uniform, I still can't match successfully with different formatted lookup files. &lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:10:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376386#M110497</guid>
      <dc:creator>xshen_anji</dc:creator>
      <dc:date>2019-03-29T15:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup matching numbers by values regardless of formats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376387#M110498</link>
      <description>&lt;P&gt;Can you please provide all possible format type from mysource.csv if possible ?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:13:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376387#M110498</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-03-29T15:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup matching numbers by values regardless of formats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376388#M110499</link>
      <description>&lt;P&gt;mylookup.csv's key field can be "3", "3.0", "3.00" etc. the mySource.csv's sourceKey also can be these different format. So even I uniform the source file, still can't match.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:17:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376388#M110499</guid>
      <dc:creator>xshen_anji</dc:creator>
      <dc:date>2019-03-29T15:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup matching numbers by values regardless of formats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376389#M110500</link>
      <description>&lt;P&gt;Ah so you don't have unique format in any of the lookup file ?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:22:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376389#M110500</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-03-29T15:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup matching numbers by values regardless of formats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376390#M110501</link>
      <description>&lt;P&gt;You can try below query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup mysource.csv
| rex field=sourceKey mode=sed "s/\.\d+//g"
| join type=left sourceKey [ inputlookup append=t mylookup.csv | rex field=Key mode=sed "s/\.\d+//g" | rename Key as sourceKey]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:29:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376390#M110501</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-03-29T15:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you lookup matching numbers by values regardless of formats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376391#M110502</link>
      <description>&lt;P&gt;Thank you for this. I would try out later. I think it would work. But this seems complicated. I just wonder if there is no lookup or join by values for number fields. Just curious!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-lookup-matching-numbers-by-values-regardless-of/m-p/376391#M110502</guid>
      <dc:creator>xshen_anji</dc:creator>
      <dc:date>2019-03-29T15:36:27Z</dc:date>
    </item>
  </channel>
</rss>

