<?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 compare search and csv file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268230#M51471</link>
    <description>&lt;P&gt;I just checked your subsearch from the nexposeallassets.csv and the field name in eval is &lt;CODE&gt;Host_Name&lt;/CODE&gt; but the one used in table is &lt;CODE&gt;host_name&lt;/CODE&gt;. The field names are case sensitive and could be the reason you don't see anything from the CSV. Update "&lt;CODE&gt;| table host_name&lt;/CODE&gt;" with "&lt;CODE&gt;| table Host_Name&lt;/CODE&gt;" and try again&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2016 20:39:22 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-03-24T20:39:22Z</dc:date>
    <item>
      <title>How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268215#M51456</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;

&lt;P&gt;I have a search which gives me all the unique hostnames and csv file which also has the hostnames ,but I am trying to compare both and I want three reports&lt;/P&gt;

&lt;P&gt;1)to get all the unique hostnames which are there in both search and csv file&lt;BR /&gt;
2)get the unique host  names which are there only in csv file NOT in search&lt;BR /&gt;
3)get the unique host names which are there in search but NOT in csv file &lt;/P&gt;

&lt;P&gt;the problem here is the search has the hostname field as Host_name and the csv file has assestname as hostname and has an extension for few of them&lt;BR /&gt;
example&lt;/P&gt;

&lt;P&gt;host_name(search)&lt;/P&gt;

&lt;P&gt;s222pnlp&lt;BR /&gt;
S5234gnn&lt;BR /&gt;
S5135&lt;/P&gt;

&lt;P&gt;assestname(csv)&lt;/P&gt;

&lt;P&gt;s222pnlp.asd&lt;BR /&gt;
S5234gnn.yuv&lt;BR /&gt;
S5135&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 17:51:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268215#M51456</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-24T17:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268216#M51457</link>
      <description>&lt;P&gt;HI vrmandadi, I believe that this might be a good use for the "join" command : &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Join"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Join&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You'll be able to break the results down based on the join type (outer, left, inner).&lt;/P&gt;

&lt;P&gt;Please let me know if this answers your question!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 18:22:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268216#M51457</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2016-03-24T18:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268217#M51458</link>
      <description>&lt;P&gt;I tried using the join commands but the problem is that when it does the match the hostnames for csv has extensions for few of them and that is causing duplication,how can that be removed?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 18:27:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268217#M51458</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-24T18:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268218#M51459</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search giving field host_name | eval From="Search" | append [ Your search to get field assetname from csv | eval host_name=mvindex(split(assetname,"."),0) | table host_name | eval From="CSV" ] | stats values(From) as From by host_name
| eval status=case(mvcount(From)=2,"Present in both", From="Search","Only available in search",1=1,"Only available in CSV") | table host_name status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Updated&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=os sourcetype="app-inventory" ad_hostname="*" |table ad_hostname |dedup ad_hostname | rename ad_hostname as Host_Name
 | append [search index=os sourcetype="app-inventory"  altiris_hostname="*" | table altiris_hostname |dedup altiris_hostname | rename altiris_hostname as Host_Name]
 | append [search index=os sourcetype="app-inventory" dns_hostname="*" |table dns_hostname| dedup dns_hostname | rename dns_hostname as Host_Name] | eval From=1
 | append [| inputlookup nexposeallassets.csv |table "Asset Names" | eval Host_Name=mvindex(split('Asset Names',"."),0) | table host_name | eval From=2 ] | stats sum(From) as From by Host_Name
  | eval status=case(From=3,"Present in both", From=1,"Only available in search",1=1,"Only available in CSV") | table Host_Name status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To filter the values which are unique to both combined and not present in both, add following to above search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;above search | where status!="Present in both"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Mar 2016 18:33:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268218#M51459</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-24T18:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268219#M51460</link>
      <description>&lt;P&gt;if you need to format one of the values or the other, you can use the rex command like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex hostname="^(?&amp;lt;hostname&amp;gt;[^\.]).*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will take all hostname values, and set them to be everything up until the first dot&lt;/P&gt;

&lt;P&gt;If this isn't exactly what you are after, you can use combinations of different regexes and the rex command, as well as the various eval functions in order to massage the values as needed.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 18:35:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268219#M51460</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2016-03-24T18:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268220#M51461</link>
      <description>&lt;P&gt;Try this as your base search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;hostnameSearchHere | eval From="Search" | appendpipe [|inputcsv max=0 assetname | eval From="CSVfile"] | rex field=Host_Name mode=sed "s/\.[^.]*$//" | stats dc(From) AS numFroms values(*) AS * by Host_Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then tack on what you need:&lt;BR /&gt;
1: &lt;CODE&gt;| where numFroms&amp;gt;1&lt;/CODE&gt;&lt;BR /&gt;
2: &lt;CODE&gt;| where numFroms=1 AND From="CSVfile"&lt;/CODE&gt;&lt;BR /&gt;
3: &lt;CODE&gt;| where numFroms=1 AND From="Search"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 18:40:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268220#M51461</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-24T18:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268221#M51462</link>
      <description>&lt;P&gt;I tried the below query &lt;/P&gt;

&lt;P&gt;index=os sourcetype="app-inventory" ad_hostname="&lt;EM&gt;" |table ad_hostname |dedup ad_hostname | rename ad_hostname as Host_Name| append [search index=os sourcetype="app-inventory"  altiris_hostname="&lt;/EM&gt;" | table altiris_hostname |dedup altiris_hostname | rename altiris_hostname as Host_Name]| append [search index=os sourcetype="app-inventory" dns_hostname="*" |table dns_hostname| dedup dns_hostname | rename dns_hostname as Host_Name] | eval From="Search" | append [| inputlookup nexposeallassets.csv |table "Asset Names" | eval Host_Name=mvindex(split("Asset Names","."),0) | table host_name | eval From="CSV" ] | stats values(From) as From by Host_Name&lt;BR /&gt;
 | eval status=case(mvcount(From)=2,"Present in both", From="Search","Only available in search",1=1,"Only available in CSV") | table Host_Name status&lt;/P&gt;

&lt;P&gt;but the output only gives the  hostnames available in search but not the whole list of all unique and csv&lt;/P&gt;

&lt;P&gt;example&lt;/P&gt;

&lt;P&gt;Host_Name          status&lt;/P&gt;

&lt;P&gt;s2324wee              available &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268221#M51462</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2020-09-29T09:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268222#M51463</link>
      <description>&lt;P&gt;Hello woodcock ,I am not able to understand what needs to be replaced in the append pipe &lt;/P&gt;

&lt;P&gt;| appendpipe [|inputcsv max=0 assetname | eval From="CSVfile"] - yours&lt;/P&gt;

&lt;P&gt;| appendpipe [|inputcsv  max=0 "Asset Name" | eval From="nexposeallassets.csv"]-mine &lt;/P&gt;

&lt;P&gt;and the numForms has only one value 2 &lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 19:00:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268222#M51463</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-24T19:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268223#M51464</link>
      <description>&lt;P&gt;well my csv file has hostname with  .abc.int or .auther.inc ,i just want to remove these extensions in the csv ,can we do that &lt;/P&gt;

&lt;P&gt;example &lt;/P&gt;

&lt;P&gt;host_name&lt;BR /&gt;
s4000cawv.abc.int &lt;BR /&gt;
achaesdb01.auther.inc&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 19:11:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268223#M51464</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-24T19:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268224#M51465</link>
      <description>&lt;P&gt;Somesoni2&lt;/P&gt;

&lt;P&gt;my csv file has hostname with .abc.int or .auther.inc ,i just want to remove these extensions in the csv ,can we do that.that will make easy to compare&lt;/P&gt;

&lt;P&gt;example&lt;/P&gt;

&lt;P&gt;host_name&lt;BR /&gt;
s4000cawv.abc.int&lt;BR /&gt;
achaesdb01.auther.inc&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 19:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268224#M51465</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-24T19:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268225#M51466</link>
      <description>&lt;P&gt;You only need to replace &lt;CODE&gt;assetname&lt;/CODE&gt; with your actual CSV file name.  DO NOT CHANGE ANYTHING ELSE (until you see that it works).&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 19:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268225#M51466</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-24T19:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268226#M51467</link>
      <description>&lt;P&gt;I can only see the values with numForms  value 2 &lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 19:43:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268226#M51467</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-24T19:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268227#M51468</link>
      <description>&lt;P&gt;That means that all Host_Name values occur in both data sets.  And it is R-then-O, not O-then-R: &lt;CODE&gt;numFroms&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 19:48:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268227#M51468</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-24T19:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268228#M51469</link>
      <description>&lt;P&gt;well  my csv file has assestname with .abc.int or .auther.inc ,i just want to remove these extensions in the csv in splunk ,can we do that.that will make easy to compare&lt;/P&gt;

&lt;P&gt;example&lt;/P&gt;

&lt;P&gt;Assestname&lt;BR /&gt;
s4000cawv.abc.int&lt;BR /&gt;
achaesdb01.auther.inc&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 19:54:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268228#M51469</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-24T19:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268229#M51470</link>
      <description>&lt;P&gt;My solution ALREADY DOES THAT.  It is this part: &lt;CODE&gt;| rex field=Host_Name mode=sed "s/\.[^.]*$//"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 20:20:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268229#M51470</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-24T20:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268230#M51471</link>
      <description>&lt;P&gt;I just checked your subsearch from the nexposeallassets.csv and the field name in eval is &lt;CODE&gt;Host_Name&lt;/CODE&gt; but the one used in table is &lt;CODE&gt;host_name&lt;/CODE&gt;. The field names are case sensitive and could be the reason you don't see anything from the CSV. Update "&lt;CODE&gt;| table host_name&lt;/CODE&gt;" with "&lt;CODE&gt;| table Host_Name&lt;/CODE&gt;" and try again&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 20:39:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268230#M51471</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-24T20:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268231#M51472</link>
      <description>&lt;P&gt;I know you have taken a lot of time for me and helping me ,really thanks for that but Can you please tell me R-then-O, not O-then-R:numForms  because I only see NumForm with 1. below is the query which I ran&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os sourcetype="app-inventory" ad_hostname="*" |table ad_hostname |dedup ad_hostname | rename ad_hostname as Host_Name| append [search index=os sourcetype="app-inventory"  altiris_hostname="*" | table altiris_hostname |dedup altiris_hostname | rename altiris_hostname as Host_Name]| append [search index=os sourcetype="app-inventory" dns_hostname="*" |table dns_hostname| dedup dns_hostname | rename dns_hostname as Host_Name]|appendpipe[ inputlookup nexposeallassets.csv | table "Asset Names"]| appendpipe [|inputcsv max=0 "Asset Names" | eval From="CSVfile"] | rex field=Host_Name mode=sed "s/\.[^.]*$//" | stats dc(From) AS numFroms values(*) AS * by Host_Name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Mar 2016 20:41:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268231#M51472</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-24T20:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268232#M51473</link>
      <description>&lt;P&gt;You keep using &lt;CODE&gt;f-O-R-m&lt;/CODE&gt; and I am using &lt;CODE&gt;f-R-O-m&lt;/CODE&gt;.  If you type it wrong, things will break.&lt;/P&gt;

&lt;P&gt;These are the problems that I see with your search:&lt;BR /&gt;
1(HUGE): Your search is much different than what you described in your question.  I see 3 searches and 2 CSV files wherewas you described 1 search and 1 CSV.&lt;BR /&gt;
2: You are missing a leading pipe (&lt;CODE&gt;|&lt;/CODE&gt;) character before &lt;CODE&gt;inputlookup&lt;/CODE&gt; so that segment of search will do nothing (no events).&lt;BR /&gt;
3: You only have a single &lt;CODE&gt;| eval From="&amp;lt;something&amp;gt;&lt;/CODE&gt; which is the key to getting the work done that you say that you need (I had &lt;CODE&gt;| eval From="Search"&lt;/CODE&gt; that you did not use).&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 21:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268232#M51473</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-24T21:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268233#M51474</link>
      <description>&lt;P&gt;I have changed that one also but I dont see anything from csv all I can see in status is field is only "Only available in search" but not the csv and a whole list of unique hostnames from both of them&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 21:24:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268233#M51474</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-24T21:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search and csv file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268234#M51475</link>
      <description>&lt;P&gt;Give this a try. I changed the  &lt;CODE&gt;| eval Host_Name=mvindex(split("Asset Names","."),0)&lt;/CODE&gt; with  &lt;CODE&gt;| eval Host_Name=mvindex(split('Asset Names',"."),0)&lt;/CODE&gt;  and the status logic&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os sourcetype="app-inventory" ad_hostname="*" |table ad_hostname |dedup ad_hostname | rename ad_hostname as Host_Name
| append [search index=os sourcetype="app-inventory"  altiris_hostname="*" | table altiris_hostname |dedup altiris_hostname | rename altiris_hostname as Host_Name]
| append [search index=os sourcetype="app-inventory" dns_hostname="*" |table dns_hostname| dedup dns_hostname | rename dns_hostname as Host_Name] | eval From=1
| append [| inputlookup nexposeallassets.csv |table "Asset Names" | eval Host_Name=mvindex(split('Asset Names',"."),0) | table host_name | eval From=2 ] | stats sum(From) as From by Host_Name
 | eval status=case(From=3,"Present in both", From=1,"Only available in search",1=1,"Only available in CSV") | table Host_Name status
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Mar 2016 21:32:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-search-and-csv-file/m-p/268234#M51475</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-24T21:32:28Z</dc:date>
    </item>
  </channel>
</rss>

