<?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: Search to identify missing data between 2 sets of data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-to-identify-missing-data-between-2-sets-of-data/m-p/294009#M164916</link>
    <description>&lt;P&gt;I apologize for not being clear but the formatting was all crazy, so just want to clarify. it isn't setup as an official lookup table. the first table has 2 fields:  Business Unit Type and Required position. So for each business unit there are multiple entries, one for each required position. The other data has 3 fields: SSN, business unit and their current position.&lt;/P&gt;

&lt;P&gt;so the bottom line is that when a record from the second data source is read, we know the business unit being referred to and going to the first data source for that business unit, we know all of the required positions that need to be there. So we want to search through the 2nd data source to see if every position has an entry and report on what's missing.&lt;/P&gt;

&lt;P&gt;Does your solution still solve this question?&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2017 22:22:12 GMT</pubDate>
    <dc:creator>collumc</dc:creator>
    <dc:date>2017-11-22T22:22:12Z</dc:date>
    <item>
      <title>Search to identify missing data between 2 sets of data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-identify-missing-data-between-2-sets-of-data/m-p/294006#M164913</link>
      <description>&lt;P&gt;Looking for an SPL way to identify missing data between 2 sets of data. &lt;BR /&gt;
To simplify the problem, I will present it this way: &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;The first set of data is essentially the lookup and identifies the type of business unit as well as all required positions:&lt;BR /&gt;
Business Unit Type      Required position&lt;BR /&gt;
Financial           Director&lt;BR /&gt;
Financial           AsstDirector&lt;BR /&gt;
Financial           AdminAsst&lt;BR /&gt;
Financial           Lead&lt;BR /&gt;
IT              VicePresident&lt;BR /&gt;
IT              Director&lt;BR /&gt;
Etc…&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;The second set of data is essentially the event data and identifies all people working in the company along with their business unit type and their position:&lt;BR /&gt;
SSN     Business Unit Type      Position&lt;BR /&gt;
111229999   IT              Director&lt;BR /&gt;
222114444   Financial           Lead&lt;BR /&gt;
444552222   Financial           AsstDirector &lt;BR /&gt;
999338888   Financial           Director&lt;BR /&gt;
334225544   IT              VicePresident&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;How can I use SPL to determine which business units are missing required positions?&lt;/P&gt;

&lt;P&gt;For example, the Financial business unit is missing an AdminAsst. In a standard programming language I could dedup the transactions coming in by business unit and then loop through the lookup for all required positions for that business unit, then search the list of employees for matches to each.&lt;/P&gt;

&lt;P&gt;How can this done in SPL… are there a good, better, best ways to accomplish this?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 21:30:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-identify-missing-data-between-2-sets-of-data/m-p/294006#M164913</guid>
      <dc:creator>collumc</dc:creator>
      <dc:date>2017-11-22T21:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Search to identify missing data between 2 sets of data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-identify-missing-data-between-2-sets-of-data/m-p/294007#M164914</link>
      <description>&lt;P&gt;the tabs threw the format off a little:&lt;BR /&gt;
data set 1(lookup data):&lt;BR /&gt;
&lt;STRONG&gt;Business Unit Type&lt;/STRONG&gt;      &lt;STRONG&gt;Required position&lt;/STRONG&gt;&lt;BR /&gt;
Financial                               Director&lt;BR /&gt;
Financial                              AsstDirector&lt;BR /&gt;
Financial                              AdminAsst&lt;BR /&gt;
Financial                              Lead&lt;BR /&gt;
IT                                         VicePresident&lt;BR /&gt;
IT                                         Director&lt;BR /&gt;
Etc…&lt;/P&gt;

&lt;P&gt;Dataset 2:&lt;BR /&gt;
&lt;STRONG&gt;SSN&lt;/STRONG&gt;      Business Unit Type     Position&lt;BR /&gt;
111229999              IT                               Director&lt;BR /&gt;
222114444              Financial                    Lead&lt;BR /&gt;
444552222              Financial                    AsstDirector &lt;BR /&gt;
999338888              Financial                    Director&lt;BR /&gt;
334225544              IT                               VicePresident&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 21:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-identify-missing-data-between-2-sets-of-data/m-p/294007#M164914</guid>
      <dc:creator>collumc</dc:creator>
      <dc:date>2017-11-22T21:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Search to identify missing data between 2 sets of data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-identify-missing-data-between-2-sets-of-data/m-p/294008#M164915</link>
      <description>&lt;P&gt;Try like this (will give you all the "Business Unit Type" Position combination which are in lookup but not in event data)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your event data search to get all "SSN" "Business Unit Type" "Position" field values 
| stats count by "Business Unit Type" Position
| append [| inputlookup BU_Position_lookup.csv | table "Business Unit Type" "Required position" | rename "Required position" as Position | eval count=0]
| stats max(count) as count by  "Business Unit Type" Position | where count=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Nov 2017 22:01:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-identify-missing-data-between-2-sets-of-data/m-p/294008#M164915</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-11-22T22:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Search to identify missing data between 2 sets of data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-identify-missing-data-between-2-sets-of-data/m-p/294009#M164916</link>
      <description>&lt;P&gt;I apologize for not being clear but the formatting was all crazy, so just want to clarify. it isn't setup as an official lookup table. the first table has 2 fields:  Business Unit Type and Required position. So for each business unit there are multiple entries, one for each required position. The other data has 3 fields: SSN, business unit and their current position.&lt;/P&gt;

&lt;P&gt;so the bottom line is that when a record from the second data source is read, we know the business unit being referred to and going to the first data source for that business unit, we know all of the required positions that need to be there. So we want to search through the 2nd data source to see if every position has an entry and report on what's missing.&lt;/P&gt;

&lt;P&gt;Does your solution still solve this question?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 22:22:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-identify-missing-data-between-2-sets-of-data/m-p/294009#M164916</guid>
      <dc:creator>collumc</dc:creator>
      <dc:date>2017-11-22T22:22:12Z</dc:date>
    </item>
  </channel>
</rss>

