<?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: Substring lookup to enhance DB query results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361412#M106733</link>
    <description>&lt;P&gt;1) Is this even possible in Splunk?&lt;BR /&gt;
Yes...BUT just like an excel look up...you need to have 1 common field value...NOT just a field name...in your case if we extact 234-567 from your query we can match it with your csv look up like a common 'key' field join in SQL/EXCEL&lt;BR /&gt;
2) Does Splunk support data/format manipulation within the search string, such as using RegEx, or can you define a substring to look for?OHH yes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
3) Are there any existing tutorials around these areas that could help guide me to a solution?&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.1/Knowledge/ConfigureCSVlookups"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.1/Knowledge/ConfigureCSVlookups&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/Knowledge/DefineanautomaticlookupinSplunkWeb"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/Knowledge/DefineanautomaticlookupinSplunkWeb&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/Inputlookup"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/Inputlookup&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Lookup"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Lookup&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2017 20:07:22 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2017-09-28T20:07:22Z</dc:date>
    <item>
      <title>Substring lookup to enhance DB query results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361411#M106732</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am VERY new to Splunk.  I have built some basic dashboards using DB queries, because the data is not (yet) being put directly into the Splunk database.  With that said, I would like to enhance my current dashboard with some additional data defined in a CSV file.  To be more specific my dashboard contains phone numbers.  My CSV file contains the location data of North American Numbering Plan area codes and prefixes (NPA-NXX).  I would like to lookup the location of the caller, based on the NPA-NXX, and include that in my dashboard.&lt;/P&gt;

&lt;P&gt;Given my limited knowledge/skill set with Splunk, I have a few questions:&lt;BR /&gt;
1) Is this even possible in Splunk?&lt;BR /&gt;
2) Does Splunk support data/format manipulation within the search string, such as using RegEx, or can you define a substring to look for?&lt;BR /&gt;
3) Are there any existing tutorials around these areas that could help guide me to a solution?&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated!!&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;EXAMPLE&lt;/STRONG&gt; (dots added for spacing purposes)&lt;BR /&gt;
[Query Results]&lt;BR /&gt;
Phone Number .......... Call Count&lt;BR /&gt;
+12345678901........... 12&lt;/P&gt;

&lt;P&gt;[CSV Entry]&lt;BR /&gt;
NPA-NXX .................. Location&lt;BR /&gt;
234-567 .................... Anytown, USA&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Desired Output&lt;/STRONG&gt;&lt;BR /&gt;
Phone Number .............. Location .................................. Call Count&lt;BR /&gt;
+12345678901............... Anytown, USA ......................... 12&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 19:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361411#M106732</guid>
      <dc:creator>sarge338</dc:creator>
      <dc:date>2017-09-28T19:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Substring lookup to enhance DB query results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361412#M106733</link>
      <description>&lt;P&gt;1) Is this even possible in Splunk?&lt;BR /&gt;
Yes...BUT just like an excel look up...you need to have 1 common field value...NOT just a field name...in your case if we extact 234-567 from your query we can match it with your csv look up like a common 'key' field join in SQL/EXCEL&lt;BR /&gt;
2) Does Splunk support data/format manipulation within the search string, such as using RegEx, or can you define a substring to look for?OHH yes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
3) Are there any existing tutorials around these areas that could help guide me to a solution?&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.1/Knowledge/ConfigureCSVlookups"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.1/Knowledge/ConfigureCSVlookups&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/Knowledge/DefineanautomaticlookupinSplunkWeb"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/Knowledge/DefineanautomaticlookupinSplunkWeb&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/Inputlookup"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/Inputlookup&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Lookup"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Lookup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 20:07:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361412#M106733</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-09-28T20:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Substring lookup to enhance DB query results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361413#M106734</link>
      <description>&lt;P&gt;Sukisen1981,&lt;/P&gt;

&lt;P&gt;Thank you for the quick response!!&lt;/P&gt;

&lt;P&gt;I'll work on figuring out how to "extract" the area code and prefix (234-567) from the query results for this purpose.  I appreciate the links!  I'm so new, I'm not even sure what I'm searching for sometimes.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 20:39:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361413#M106734</guid>
      <dc:creator>sarge338</dc:creator>
      <dc:date>2017-09-28T20:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Substring lookup to enhance DB query results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361414#M106735</link>
      <description>&lt;P&gt;Hey @sarge338, welcome to the Splunk community! When you're responding to answers on Answer posts please use the comment feature rather than posting a new "answer". As well, if @sukisen1981 is able to find the solution for you please accept their answer so you can award karma points and close the question! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; You can also upvote to award points. &lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 20:50:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361414#M106735</guid>
      <dc:creator>lfedak_splunk</dc:creator>
      <dc:date>2017-09-28T20:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Substring lookup to enhance DB query results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361415#M106736</link>
      <description>&lt;P&gt;Try this for prefix:&lt;BR /&gt;
|eval prfxubstr("Phone Number",3,5)"-"+substr("Phone Number",6,8&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 21:04:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361415#M106736</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-09-28T21:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Substring lookup to enhance DB query results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361416#M106737</link>
      <description>&lt;P&gt;Sukisen1981,&lt;/P&gt;

&lt;P&gt;Thank you for the sample code.  I had to manipulate it a little, but it was close enough to get me where I needed to be.&lt;/P&gt;

&lt;P&gt;The assistance is much appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 21:14:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Substring-lookup-to-enhance-DB-query-results/m-p/361416#M106737</guid>
      <dc:creator>sarge338</dc:creator>
      <dc:date>2017-11-15T21:14:52Z</dc:date>
    </item>
  </channel>
</rss>

