<?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: Lookup usage question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639221#M221488</link>
    <description>&lt;P&gt;Thank you. I figured out my problem.&lt;BR /&gt;&lt;BR /&gt;On the query I was trying to use username=mike and trying to reference the name mike in my emaillookup.csv lookup table. However, the name in the lookup table was in the form of &lt;A href="mailto:mike@my-site.com" target="_blank"&gt;mike@my-site.com&lt;/A&gt;&amp;nbsp;. I had to regex the "@my-site.com" from the name mike in order to reference mike. &amp;nbsp;Once I was referencing mike on both the query and the lookup table, I was able to pull the fields I needed.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for both of your recommendations&lt;/P&gt;</description>
    <pubDate>Fri, 07 Apr 2023 16:09:49 GMT</pubDate>
    <dc:creator>dionrivera</dc:creator>
    <dc:date>2023-04-07T16:09:49Z</dc:date>
    <item>
      <title>How to correlate a field from a query to a field from a lookup file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/638701#M221309</link>
      <description>&lt;P&gt;Hello. I've been watching a few lookup videos but they mostly concentrate on extracting data from a lookup file. None of them are addressing a case where you have to correlate a field from a query to a field from a lookup file. Here is my example. I have a query (index=web username=mike) I would like to pull Mike's email from a emaillookup.csv file so that my final table result looks like below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;username&amp;nbsp; &amp;nbsp; email&lt;/P&gt;
&lt;P&gt;mike&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;A href="mailto:mike@yahoo.com" target="_blank" rel="noopener"&gt;mike@yahoo.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far, I have tried index=web username=mike | lookup emaillookup.csv email OUTPUT username with no success&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 16:10:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/638701#M221309</guid>
      <dc:creator>dionrivera</dc:creator>
      <dc:date>2023-04-10T16:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup usage question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639053#M221430</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try swapping your input and output fields:&lt;/P&gt;&lt;P&gt;index=web username=mike | lookup emaillookup.csv username output email&lt;/P&gt;&lt;P&gt;The lookup command takes the form:&lt;/P&gt;&lt;P&gt;| lookup &amp;lt;lookup_name&amp;gt; &amp;lt;lookup_field_name&amp;gt; [as &amp;lt;event_field_name&amp;gt;] output &amp;lt;lookup_field_name_1&amp;gt; [as &amp;lt;event_field_name_1&amp;gt;] [&amp;lt;lookup_field_name_2&amp;gt; [as &amp;lt;event_field_name_2&amp;gt;] ...]&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 17:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639053#M221430</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2023-04-06T17:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup usage question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639081#M221436</link>
      <description>&lt;P&gt;Like this:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;index="web" AND username="mike"&lt;BR /&gt;&lt;/SPAN&gt;| lookup &lt;SPAN&gt;emaillookup.csv&lt;/SPAN&gt;&amp;nbsp;nameFieldInLookupFIle AS username OUTPUT email&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 19:57:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639081#M221436</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2023-04-06T19:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup usage question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639221#M221488</link>
      <description>&lt;P&gt;Thank you. I figured out my problem.&lt;BR /&gt;&lt;BR /&gt;On the query I was trying to use username=mike and trying to reference the name mike in my emaillookup.csv lookup table. However, the name in the lookup table was in the form of &lt;A href="mailto:mike@my-site.com" target="_blank"&gt;mike@my-site.com&lt;/A&gt;&amp;nbsp;. I had to regex the "@my-site.com" from the name mike in order to reference mike. &amp;nbsp;Once I was referencing mike on both the query and the lookup table, I was able to pull the fields I needed.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for both of your recommendations&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 16:09:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639221#M221488</guid>
      <dc:creator>dionrivera</dc:creator>
      <dc:date>2023-04-07T16:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup usage question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639227#M221490</link>
      <description>&lt;P&gt;You can create a lookup definition and use "WILDCARD(user)" and make it "mike*" and it will match either.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 16:34:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639227#M221490</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2023-04-07T16:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup usage question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639671#M221666</link>
      <description>&lt;P&gt;So, if I had more than one user, could I use WILDCARD(user*)?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 17:18:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639671#M221666</guid>
      <dc:creator>dionrivera</dc:creator>
      <dc:date>2023-04-12T17:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup usage question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639673#M221668</link>
      <description>&lt;P&gt;Any user that starts with "mike" would match.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 17:26:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-a-field-from-a-query-to-a-field-from-a-lookup/m-p/639673#M221668</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2023-04-12T17:26:56Z</dc:date>
    </item>
  </channel>
</rss>

