<?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: Compare CSV to Search [IN CSV NOT IN SEARCH] in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Compare-CSV-to-Search-IN-CSV-NOT-IN-SEARCH/m-p/428981#M75167</link>
    <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=proofpoint sourcetype=pps_messagelog 
 | search envelope.rcpts{} = * 
 | rex field=envelope.rcpts{} "(\@(?&amp;lt;PP_To&amp;gt;[a-zA-Z0-9]+.+))" 
 | rename envelope.rcpts{} as PP_Rcpts
 | fields PP_Rcpts PP_To
 | eval from="Data"
 | append 
     [ inputlookup DL_List.csv 
     | fields PP_Rcpts, "Display Name" | eval from="CSV"] 
 | stats values(from) as from values("Display name") as "DisplayName" by PP_Rcpts 
 | where mvcount(from)=1 AND from="CSV"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 21 Jun 2019 14:55:06 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2019-06-21T14:55:06Z</dc:date>
    <item>
      <title>Compare CSV to Search [IN CSV NOT IN SEARCH]</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Compare-CSV-to-Search-IN-CSV-NOT-IN-SEARCH/m-p/428979#M75165</link>
      <description>&lt;P&gt;Good Day!&lt;BR /&gt;
I am trying to figure out a way to compare a csv file to a search and return only what is in the CSV file that was not in the search. Im taking an email list and doing a search for all emails received my end goal is to figure out emails in the csv that haven't received an email in x days.&lt;/P&gt;

&lt;P&gt;I have tried: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=proofpoint 
    sourcetype=pps_messagelog 
| rex field=envelope.rcpts{} "(\@(?&amp;lt;PP_To&amp;gt;[a-zA-Z0-9]+.+))" 
| search envelope.rcpts{} = * 
| rename envelope.rcpts{} as "PP_Rcpts" 
| append 
    [ inputlookup DL_List.csv 
    | fields PP_Rcpts, "Display Name" ] 
| table PP_To,PP_Rcpts, "Display Name" 
| stats count by PP_Rcpts 
| search count=1 | lookup DL_List.csv PP_Rcpts  as PP_Rcpts output PP_Rcpts,"Display Name" | search PP_Rcpts!=""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I.E&lt;/P&gt;

&lt;H2&gt;CSV&lt;/H2&gt;

&lt;UL&gt;
&lt;LI&gt;a&lt;/LI&gt;
&lt;LI&gt;b&lt;/LI&gt;
&lt;LI&gt;c&lt;/LI&gt;
&lt;LI&gt;d&lt;/LI&gt;
&lt;LI&gt;e&lt;/LI&gt;
&lt;LI&gt;f&lt;/LI&gt;
&lt;LI&gt;g&lt;/LI&gt;
&lt;/UL&gt;

&lt;H2&gt;Search Return&lt;/H2&gt;

&lt;P&gt;c&lt;BR /&gt;
d&lt;BR /&gt;
e&lt;BR /&gt;
f&lt;BR /&gt;
h&lt;BR /&gt;
i&lt;BR /&gt;
j&lt;/P&gt;

&lt;H2&gt;Wanted Results ( after CSV lookup)&lt;/H2&gt;

&lt;P&gt;a&lt;BR /&gt;
b&lt;BR /&gt;
g&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:37:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Compare-CSV-to-Search-IN-CSV-NOT-IN-SEARCH/m-p/428979#M75165</guid>
      <dc:creator>Workmanaquariou</dc:creator>
      <dc:date>2019-06-19T13:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Compare CSV to Search [IN CSV NOT IN SEARCH]</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Compare-CSV-to-Search-IN-CSV-NOT-IN-SEARCH/m-p/428980#M75166</link>
      <description>&lt;P&gt;I also tried &lt;BR /&gt;
| inputlookup DL_List.csv &lt;BR /&gt;
| fields PP_Rcpts &lt;BR /&gt;
| search NOT &lt;BR /&gt;
    [ search index=proofpoint &lt;BR /&gt;
        sourcetype=pps_messagelog &lt;BR /&gt;
    | rex field=envelope.rcpts{} "(\@(?&lt;PP_TO&gt;[a-zA-Z0-9]+.+))" &lt;BR /&gt;
    | rename envelope.rcpts{} as "PP_Rcpts" &lt;BR /&gt;
    | stats count by PP_Rcpts&lt;BR /&gt;
        ]&lt;/PP_TO&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:01:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Compare-CSV-to-Search-IN-CSV-NOT-IN-SEARCH/m-p/428980#M75166</guid>
      <dc:creator>Workmanaquariou</dc:creator>
      <dc:date>2020-09-30T01:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compare CSV to Search [IN CSV NOT IN SEARCH]</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Compare-CSV-to-Search-IN-CSV-NOT-IN-SEARCH/m-p/428981#M75167</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=proofpoint sourcetype=pps_messagelog 
 | search envelope.rcpts{} = * 
 | rex field=envelope.rcpts{} "(\@(?&amp;lt;PP_To&amp;gt;[a-zA-Z0-9]+.+))" 
 | rename envelope.rcpts{} as PP_Rcpts
 | fields PP_Rcpts PP_To
 | eval from="Data"
 | append 
     [ inputlookup DL_List.csv 
     | fields PP_Rcpts, "Display Name" | eval from="CSV"] 
 | stats values(from) as from values("Display name") as "DisplayName" by PP_Rcpts 
 | where mvcount(from)=1 AND from="CSV"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jun 2019 14:55:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Compare-CSV-to-Search-IN-CSV-NOT-IN-SEARCH/m-p/428981#M75167</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-06-21T14:55:06Z</dc:date>
    </item>
  </channel>
</rss>

