<?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 do I Compare field values between Lookup Table and Sourcetype and find the Delta in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634113#M220243</link>
    <description>&lt;P&gt;After the stats command you will only have fields that are part of the stats, so in this case, found, account_no and cell. So, if you want to carry through address do this using the modified append and stats.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test sourcetype=test_account
| stats count by account_no cell
| lookup testaccount_holder.csv account_no cell OUTPUT account_no as found
``` So in the search above, you will have 3 fields
    account_no, cell and found
```
| append [
  | inputlookup testaccount_holder.csv
  ``` Now specify the fields you want from the lookup to pass through to the end result ```
  | fields account_no cell name address
]
``` and this stats command using wildcards, will carry through ANY of the fields you retain above ```
| stats values(*) as * by account_no cell
| where isnull(found)
| table account_no cell name address&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 11 Mar 2023 01:43:07 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2023-03-11T01:43:07Z</dc:date>
    <item>
      <title>How do I Compare field values between Lookup Table and Sourcetype and find the Delta</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634000#M220199</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am facing issues to find delta.&lt;/P&gt;&lt;P&gt;I have:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Lookup Table&lt;/STRONG&gt;: testaccount_holder.csv&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2 Field names in Lookup&lt;/STRONG&gt;: account_no and cell&lt;/P&gt;&lt;P&gt;index=test Sourcetype =test_account&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2 Field names :&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;account_no and cell&lt;/P&gt;&lt;P&gt;Now, need to compare Lookup table with&amp;nbsp; sourcetype using these 2 fields and find all the records/rows which are exist in Lookup table but not in sourcetype. This comparison is based on these 2 fields.&lt;/P&gt;&lt;P&gt;Any recommendations will be highly appreciated. Thank you so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 06:05:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634000#M220199</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2023-03-10T06:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I Compare field values between Lookup Table and Sourcetype and find the Delta</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634002#M220201</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test sourcetype=test_account
| stats count by account_no cell
| lookup testaccount_holder.csv account_no cell OUTPUT account_no as found
| append [
  | inputlookup testaccount_holder.csv
]
| stats values(found) as found by account_no cell
| where isnull(found)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 10 Mar 2023 06:09:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634002#M220201</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-03-10T06:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I Compare field values between Lookup Table and Sourcetype and find the Delta</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634003#M220202</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you so much for your quick response, truly appreciate it. Your SPL code is working as expected, AWESOME!!!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 06:29:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634003#M220202</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2023-03-10T06:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I Compare field values between Lookup Table and Sourcetype and find the Delta</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634008#M220203</link>
      <description>&lt;P&gt;Great! You will find this is a common pattern referred to as 'proving the negative', i.e. when the data does NOT contain what you are looking for, so you do the pattern of&lt;/P&gt;&lt;P&gt;1. Search Data&lt;BR /&gt;2. Set an indicator that it's present in data&lt;BR /&gt;3. Append the expected source of truth&lt;BR /&gt;4. Resolve the duplicates&lt;BR /&gt;5. Validate what is not present&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 06:44:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634008#M220203</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-03-10T06:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I Compare field values between Lookup Table and Sourcetype and find the Delta</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634009#M220204</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have one more question related to this. I was trying show other fields which are present in Lookup Table and was using (&lt;STRONG&gt;| table account_no cell name address&lt;/STRONG&gt;) at the end, but not showing up. Any recommendation will be highly appreciated. Thank you again.&lt;/P&gt;&lt;P&gt;index=test sourcetype=test_account&lt;BR /&gt;| stats count by account_no cell&lt;BR /&gt;| lookup testaccount_holder.csv account_no cell OUTPUT account_no as found&lt;BR /&gt;| append [&lt;BR /&gt;| inputlookup testaccount_holder.csv&lt;BR /&gt;]&lt;BR /&gt;| stats values(found) as found by account_no cell&lt;BR /&gt;| where isnull(found)&lt;STRONG&gt;| table account_no cell name address&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 06:44:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634009#M220204</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2023-03-10T06:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I Compare field values between Lookup Table and Sourcetype and find the Delta</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634113#M220243</link>
      <description>&lt;P&gt;After the stats command you will only have fields that are part of the stats, so in this case, found, account_no and cell. So, if you want to carry through address do this using the modified append and stats.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test sourcetype=test_account
| stats count by account_no cell
| lookup testaccount_holder.csv account_no cell OUTPUT account_no as found
``` So in the search above, you will have 3 fields
    account_no, cell and found
```
| append [
  | inputlookup testaccount_holder.csv
  ``` Now specify the fields you want from the lookup to pass through to the end result ```
  | fields account_no cell name address
]
``` and this stats command using wildcards, will carry through ANY of the fields you retain above ```
| stats values(*) as * by account_no cell
| where isnull(found)
| table account_no cell name address&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Mar 2023 01:43:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/634113#M220243</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-03-11T01:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I Compare field values between Lookup Table and Sourcetype and find the Delta</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/651219#M225144</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Delta created using following logic is not giving the right output.&amp;nbsp; Output from that delta I found basically what we can get if you run:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| inputlookup testaccount_holder.csv&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any recommendations would be appreciated. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 20:55:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-Compare-field-values-between-Lookup-Table-and/m-p/651219#M225144</guid>
      <dc:creator>SplunkDash</dc:creator>
      <dc:date>2023-07-19T20:55:25Z</dc:date>
    </item>
  </channel>
</rss>

