<?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: How to remove a duplicate from a lookup or only return one of the results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213675#M62681</link>
    <description>&lt;P&gt;Create a lookup definition.  &lt;/P&gt;

&lt;P&gt;manager &amp;gt; lookups &amp;gt; lookup definitations&lt;/P&gt;

&lt;P&gt;check advanced options then change the maximum matches to 1&lt;/P&gt;

&lt;P&gt;so instead of&lt;BR /&gt;&lt;BR /&gt;
| LOOKUP mylookup.csv  name AS first_name OUTPUT department AS Dept&lt;BR /&gt;
you use&lt;BR /&gt;
 | LOOKUP mylookupdefinition name AS first_name OUTPUT department AS Dept&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 07:13:26 GMT</pubDate>
    <dc:creator>cramasta</dc:creator>
    <dc:date>2020-09-29T07:13:26Z</dc:date>
    <item>
      <title>How to remove a duplicate from a lookup or only return one of the results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213674#M62680</link>
      <description>&lt;P&gt;I am performing a lookup on a table that contains data that I don't manage and cannot change. The lookup is returning duplicates for some people because they're listed twice in the source table. How do I either return only one of the results from the lookup or remove the duplicate from only the affected records? My data looks something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Name     Dept
----------------------
Joe       IT
          IT
----------------------
Mary      IT
----------------------
Bob      Ops
----------------------
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't want to remove all occurrences of IT. I only want to remove the duplicates from Joe's row. Or perhaps there's a different way I can get the information so that it is only returning one result. The lookup portion is pretty standard and looks like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| LOOKUP name AS first_name OUTPUT department AS Dept
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Sep 2015 17:12:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213674#M62680</guid>
      <dc:creator>bmkaiser</dc:creator>
      <dc:date>2015-09-03T17:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a duplicate from a lookup or only return one of the results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213675#M62681</link>
      <description>&lt;P&gt;Create a lookup definition.  &lt;/P&gt;

&lt;P&gt;manager &amp;gt; lookups &amp;gt; lookup definitations&lt;/P&gt;

&lt;P&gt;check advanced options then change the maximum matches to 1&lt;/P&gt;

&lt;P&gt;so instead of&lt;BR /&gt;&lt;BR /&gt;
| LOOKUP mylookup.csv  name AS first_name OUTPUT department AS Dept&lt;BR /&gt;
you use&lt;BR /&gt;
 | LOOKUP mylookupdefinition name AS first_name OUTPUT department AS Dept&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:13:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213675#M62681</guid>
      <dc:creator>cramasta</dc:creator>
      <dc:date>2020-09-29T07:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a duplicate from a lookup or only return one of the results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213676#M62682</link>
      <description>&lt;P&gt;you can also dedup the lookup file by running the a query as such.&lt;/P&gt;

&lt;P&gt;| inputlookup mylookup.csv | dedup name | outputlookup mylookup.csv&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 17:44:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213676#M62682</guid>
      <dc:creator>cramasta</dc:creator>
      <dc:date>2015-09-03T17:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a duplicate from a lookup or only return one of the results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213677#M62683</link>
      <description>&lt;P&gt;Thank you for your help! I like this because I'd rather never have the data in the first place.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 17:55:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213677#M62683</guid>
      <dc:creator>bmkaiser</dc:creator>
      <dc:date>2015-09-03T17:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a duplicate from a lookup or only return one of the results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213678#M62684</link>
      <description>&lt;P&gt;I did also figure out how to remove the duplicate using mvdedup:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| EVAL Dept=MVDEDUP(Dept)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Sep 2015 12:51:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213678#M62684</guid>
      <dc:creator>bmkaiser</dc:creator>
      <dc:date>2015-09-04T12:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a duplicate from a lookup or only return one of the results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213679#M62685</link>
      <description>&lt;P&gt;This was incredibly helpful. Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 20:05:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-a-duplicate-from-a-lookup-or-only-return-one-of/m-p/213679#M62685</guid>
      <dc:creator>JWellsBNSF</dc:creator>
      <dc:date>2019-11-21T20:05:08Z</dc:date>
    </item>
  </channel>
</rss>

