<?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: Join 2 lookups match fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500552#M139359</link>
    <description>&lt;P&gt;@richgalloway &lt;/P&gt;

&lt;P&gt;basically I want to join two lookups and combine the fields from both by matching on a user field&lt;/P&gt;

&lt;P&gt;lookup1 has fields user, ip, mac&lt;BR /&gt;
lookup2 has fields user, workstation, guid, sid&lt;/P&gt;

&lt;P&gt;I want to match the user field and then create a new lookup as below:&lt;/P&gt;

&lt;P&gt;lookup with fields user, ip, mac, workstation, guid, sid.&lt;/P&gt;

&lt;P&gt;I can join these by using |eval matchfield user   but when I do this I lose 19 results from lookup1 as there is no user match in lookup2&lt;/P&gt;

&lt;P&gt;lookup1 has 269 users&lt;BR /&gt;
lookup2 has 250 users (missing 19 users)&lt;/P&gt;

&lt;P&gt;I need to create the new lookup but also keep the 19 users that were not matched.&lt;/P&gt;

&lt;P&gt;hope that makes sense&lt;/P&gt;</description>
    <pubDate>Mon, 18 May 2020 13:55:09 GMT</pubDate>
    <dc:creator>nathanluke86</dc:creator>
    <dc:date>2020-05-18T13:55:09Z</dc:date>
    <item>
      <title>Join 2 lookups match fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500549#M139356</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am looking to join 2 lookups and match the field "AccountName" from lookup1 with user field in lookup 2.&lt;/P&gt;

&lt;P&gt;I have 269 results in lookup 1 and 250 results in lookup 2.&lt;/P&gt;

&lt;P&gt;When I match the fields and join the lookups I lose the 19 results that dont have a match.&lt;/P&gt;

&lt;P&gt;How can I do this a keep the 19 results so I can manually update these&lt;/P&gt;

&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 13:02:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500549#M139356</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-05-18T13:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 lookups match fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500550#M139357</link>
      <description>&lt;P&gt;Hello nathanluke86!&lt;/P&gt;

&lt;P&gt;If you want to get the results from both lookups, try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup lookup1.csv
| append
[|inputlookup lookup2.csv]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then to get only one row per user, you could add something like this to the end:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats values(*) as * by user
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 May 2020 13:32:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500550#M139357</guid>
      <dc:creator>acfecondo75</dc:creator>
      <dc:date>2020-05-18T13:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 lookups match fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500551#M139358</link>
      <description>&lt;P&gt;Please tell us more about the problem you are trying to solve so we can help you find a solution.&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 13:35:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500551#M139358</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-18T13:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 lookups match fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500552#M139359</link>
      <description>&lt;P&gt;@richgalloway &lt;/P&gt;

&lt;P&gt;basically I want to join two lookups and combine the fields from both by matching on a user field&lt;/P&gt;

&lt;P&gt;lookup1 has fields user, ip, mac&lt;BR /&gt;
lookup2 has fields user, workstation, guid, sid&lt;/P&gt;

&lt;P&gt;I want to match the user field and then create a new lookup as below:&lt;/P&gt;

&lt;P&gt;lookup with fields user, ip, mac, workstation, guid, sid.&lt;/P&gt;

&lt;P&gt;I can join these by using |eval matchfield user   but when I do this I lose 19 results from lookup1 as there is no user match in lookup2&lt;/P&gt;

&lt;P&gt;lookup1 has 269 users&lt;BR /&gt;
lookup2 has 250 users (missing 19 users)&lt;/P&gt;

&lt;P&gt;I need to create the new lookup but also keep the 19 users that were not matched.&lt;/P&gt;

&lt;P&gt;hope that makes sense&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 13:55:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500552#M139359</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-05-18T13:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Join 2 lookups match fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500553#M139360</link>
      <description>&lt;P&gt;Thanks @acfecondo75 &lt;/P&gt;

&lt;P&gt;used the above but changed append to appendcols&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 14:36:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-2-lookups-match-fields/m-p/500553#M139360</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-05-18T14:36:42Z</dc:date>
    </item>
  </channel>
</rss>

