<?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: Hi i want to join a field from log file and lookup table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Hi-i-want-to-join-a-field-from-log-file-and-lookup-table/m-p/319604#M95546</link>
    <description>&lt;P&gt;If you have Lookup Definition created as &lt;STRONG&gt;b&lt;/STRONG&gt; from (&lt;STRONG&gt;Settings &amp;gt; Lookups &amp;gt; Lookup Definition&lt;/STRONG&gt;) for lookup table &lt;STRONG&gt;b.csv&lt;/STRONG&gt;, you can use the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearchWithIndexAndHostName&amp;gt; source="a.log"
| lookup b dept_id OUTPUT allowed_leave designation
| where allowed_leave&amp;lt;Leave_count
| table Name dept_id allowed_leave Leave_count designation
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Refer to lookup command documentation: &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>Wed, 12 Apr 2017 10:16:34 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-04-12T10:16:34Z</dc:date>
    <item>
      <title>Hi i want to join a field from log file and lookup table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hi-i-want-to-join-a-field-from-log-file-and-lookup-table/m-p/319603#M95545</link>
      <description>&lt;P&gt;for eg in a.log file i have data as&lt;BR /&gt;&lt;BR /&gt;
dept_id    Name    Leave_count &lt;BR /&gt;
 1              xx            9 &lt;BR /&gt;
2               yy             8 &lt;BR /&gt;
3              zz               4 &lt;BR /&gt;
  and have a b.csv lookup table file which has&lt;BR /&gt;&lt;BR /&gt;
 dept_id      designation        allowed_leave &lt;BR /&gt;
1                  manager             10 &lt;BR /&gt;
2                  TL                          6 &lt;BR /&gt;
3               senior manager    10&lt;/P&gt;

&lt;P&gt;now i want to compare leave count and allowed leave by joining a.log and b.csv lookup table using dept_id and display name,designation which satisfies (allowed_leave-leave count)&amp;lt; 0 &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:36:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hi-i-want-to-join-a-field-from-log-file-and-lookup-table/m-p/319603#M95545</guid>
      <dc:creator>ujwalagangakoth</dc:creator>
      <dc:date>2020-09-29T13:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hi i want to join a field from log file and lookup table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hi-i-want-to-join-a-field-from-log-file-and-lookup-table/m-p/319604#M95546</link>
      <description>&lt;P&gt;If you have Lookup Definition created as &lt;STRONG&gt;b&lt;/STRONG&gt; from (&lt;STRONG&gt;Settings &amp;gt; Lookups &amp;gt; Lookup Definition&lt;/STRONG&gt;) for lookup table &lt;STRONG&gt;b.csv&lt;/STRONG&gt;, you can use the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearchWithIndexAndHostName&amp;gt; source="a.log"
| lookup b dept_id OUTPUT allowed_leave designation
| where allowed_leave&amp;lt;Leave_count
| table Name dept_id allowed_leave Leave_count designation
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Refer to lookup command documentation: &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>Wed, 12 Apr 2017 10:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hi-i-want-to-join-a-field-from-log-file-and-lookup-table/m-p/319604#M95546</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-04-12T10:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hi i want to join a field from log file and lookup table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Hi-i-want-to-join-a-field-from-log-file-and-lookup-table/m-p/319605#M95547</link>
      <description>&lt;P&gt;@ujwalagangakotha were you able to try out the answer?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 06:42:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Hi-i-want-to-join-a-field-from-log-file-and-lookup-table/m-p/319605#M95547</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-04-13T06:42:22Z</dc:date>
    </item>
  </channel>
</rss>

