<?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: Query to get info from lookup file if event field contains data from two field in lookup file. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-to-get-info-from-lookup-file-if-event-field-contains-data/m-p/614065#M213397</link>
    <description>&lt;P&gt;two lookup statement on same lookup file,&amp;nbsp;&lt;/P&gt;&lt;P&gt;2nd lookup statement overriding first lookup statement output and making it null.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Abhineet_0-1663837350898.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21602i2CA550B56044DAA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Abhineet_0-1663837350898.png" alt="Abhineet_0-1663837350898.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Sep 2022 09:02:48 GMT</pubDate>
    <dc:creator>Abhineet</dc:creator>
    <dc:date>2022-09-22T09:02:48Z</dc:date>
    <item>
      <title>Search to get info from lookup file if event field contains data from two field in lookup file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-get-info-from-lookup-file-if-event-field-contains-data/m-p/614060#M213393</link>
      <description>&lt;P&gt;Want to create search to get info from lookup file if event field contains data from two field in lookup file.&lt;/P&gt;
&lt;P&gt;log event have field &lt;STRONG&gt;"machineUserName"&amp;nbsp;&lt;/STRONG&gt;having value &lt;STRONG&gt;"employeeNumber"&lt;/STRONG&gt; or &lt;STRONG&gt;"Email-ID"&lt;/STRONG&gt; want to do lookup from &lt;STRONG&gt;"workdayData.csv"&lt;/STRONG&gt; having two separate field for&amp;nbsp;&lt;STRONG&gt;"employeeNumber" &lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;"Email-ID"&lt;/STRONG&gt;&amp;nbsp;want to create lookup query&amp;nbsp; which will check&amp;nbsp;&lt;STRONG&gt;"machineUserName"&lt;/STRONG&gt; field from log event having either&amp;nbsp;&lt;STRONG&gt;"employeeNumber"&amp;nbsp;&lt;/STRONG&gt;or&amp;nbsp;&lt;STRONG&gt;"Email-ID" &lt;/STRONG&gt;as value will check respective field in lookup and provide other information in lookup table.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Log Event Field&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Abhineet_0-1663835259712.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21601iA330E80FBD2139A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Abhineet_0-1663835259712.png" alt="Abhineet_0-1663835259712.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Lookup-table:&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;&lt;STRONG&gt;WorkdayData.csv&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Sample Data&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;HEADER&lt;/STRONG&gt;&lt;/U&gt;:empId,empNum,name,email,country,loc,locDesc,OCGRP,OCSGRP,deptName,jobTitle,empStatus,bu,l1MgrEmail&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;Sample-Data&lt;/STRONG&gt;&lt;/U&gt;: X0134567,AMAT-0134567,"Jose numo --CNTR","Jose_numo@contractor.amat.com","United States of America",CASCL,"Santa Clara,CA",AGS,OCE,"NACDC NAmer Entity","Logistics Operations - Supplie",Active,"AGS GPS&amp;amp;T, Operations &amp;amp; Central Engineering","Carmy_Hyden@amat.com"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 15:09:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-get-info-from-lookup-file-if-event-field-contains-data/m-p/614060#M213393</guid>
      <dc:creator>Abhineet</dc:creator>
      <dc:date>2022-09-22T15:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Query to get info from lookup file if event field contains data from two field in lookup file.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-get-info-from-lookup-file-if-event-field-contains-data/m-p/614062#M213395</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236195"&gt;@Abhineet&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the solution is using two times the lookup command:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| lookup workdayData.csv employeeNumber AS machineUserName OUTPUTS &amp;lt;lookup_columns&amp;gt;
| lookup workdayData.csv Email-ID AS machineUserName OUTPUTS &amp;lt;lookup_columns&amp;gt;
| ...&lt;/LI-CODE&gt;&lt;P&gt;Only one addition information: don't use "-" in field names, it's better "_" becausae it could be interpretated as the subtraction operator.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 08:47:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-get-info-from-lookup-file-if-event-field-contains-data/m-p/614062#M213395</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-22T08:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Query to get info from lookup file if event field contains data from two field in lookup file.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-get-info-from-lookup-file-if-event-field-contains-data/m-p/614065#M213397</link>
      <description>&lt;P&gt;two lookup statement on same lookup file,&amp;nbsp;&lt;/P&gt;&lt;P&gt;2nd lookup statement overriding first lookup statement output and making it null.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Abhineet_0-1663837350898.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21602i2CA550B56044DAA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Abhineet_0-1663837350898.png" alt="Abhineet_0-1663837350898.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 09:02:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-get-info-from-lookup-file-if-event-field-contains-data/m-p/614065#M213397</guid>
      <dc:creator>Abhineet</dc:creator>
      <dc:date>2022-09-22T09:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Query to get info from lookup file if event field contains data from two field in lookup file.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-get-info-from-lookup-file-if-event-field-contains-data/m-p/614076#M213403</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236195"&gt;@Abhineet&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please use OUTPUTNEW instead OUTPUT&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| lookup workdayData.csv employeeNumber AS machineUserName OUTPUTNEW &amp;lt;lookup_columns&amp;gt;
| lookup workdayData.csv Email-ID AS machineUserName OUTPUTNEW &amp;lt;lookup_columns&amp;gt;
| ...&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 10:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-get-info-from-lookup-file-if-event-field-contains-data/m-p/614076#M213403</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-22T10:01:05Z</dc:date>
    </item>
  </channel>
</rss>

