<?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 How to compare two source files with combination of 4 fields as a unique key? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-source-files-with-combination-of-4-fields-as/m-p/373606#M109857</link>
    <description>&lt;P&gt;I have two sources Send Log and Received Log&lt;BR /&gt;
Send Log has four fields namely A B C D. (Combination of 4 fields as unique)&lt;/P&gt;

&lt;P&gt;--A-----B-----C------D----&lt;BR /&gt;
1. ww1     xx2       yy1      zz2&lt;BR /&gt;
2. ww1        xx1         yy1        zz1&lt;BR /&gt;
3. ww2       xx1        yy2           zz1&lt;BR /&gt;
4. ww2        xx2        yy2          zz2&lt;/P&gt;

&lt;P&gt;Received Log is having more than 5 fields namely A B C D E with A B C and D having same values as sendlog.&lt;BR /&gt;
---A----B-----C----D----E---F----&lt;BR /&gt;
1. ww1     xx2         yy1         zz2       1b3   Done&lt;BR /&gt;
2. ww1     xx1         yy1        zz1        5bc       Done&lt;BR /&gt;
4. ww2     xx2        yy2        zz2       a3b      Processed&lt;/P&gt;

&lt;P&gt;If the value of all the four fields A B C and D match, then it should it retrieve the value of F from ReceivedLog and missing record (3rd row as not received)&lt;/P&gt;

&lt;P&gt;Please help which is suitable options this case, and how to achieve this.&lt;/P&gt;

&lt;P&gt;Appreciate your help..!!&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2018 15:55:32 GMT</pubDate>
    <dc:creator>rajumedipally</dc:creator>
    <dc:date>2018-02-12T15:55:32Z</dc:date>
    <item>
      <title>How to compare two source files with combination of 4 fields as a unique key?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-source-files-with-combination-of-4-fields-as/m-p/373606#M109857</link>
      <description>&lt;P&gt;I have two sources Send Log and Received Log&lt;BR /&gt;
Send Log has four fields namely A B C D. (Combination of 4 fields as unique)&lt;/P&gt;

&lt;P&gt;--A-----B-----C------D----&lt;BR /&gt;
1. ww1     xx2       yy1      zz2&lt;BR /&gt;
2. ww1        xx1         yy1        zz1&lt;BR /&gt;
3. ww2       xx1        yy2           zz1&lt;BR /&gt;
4. ww2        xx2        yy2          zz2&lt;/P&gt;

&lt;P&gt;Received Log is having more than 5 fields namely A B C D E with A B C and D having same values as sendlog.&lt;BR /&gt;
---A----B-----C----D----E---F----&lt;BR /&gt;
1. ww1     xx2         yy1         zz2       1b3   Done&lt;BR /&gt;
2. ww1     xx1         yy1        zz1        5bc       Done&lt;BR /&gt;
4. ww2     xx2        yy2        zz2       a3b      Processed&lt;/P&gt;

&lt;P&gt;If the value of all the four fields A B C and D match, then it should it retrieve the value of F from ReceivedLog and missing record (3rd row as not received)&lt;/P&gt;

&lt;P&gt;Please help which is suitable options this case, and how to achieve this.&lt;/P&gt;

&lt;P&gt;Appreciate your help..!!&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 15:55:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-source-files-with-combination-of-4-fields-as/m-p/373606#M109857</guid>
      <dc:creator>rajumedipally</dc:creator>
      <dc:date>2018-02-12T15:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two source files with combination of 4 fields as a unique key?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-source-files-with-combination-of-4-fields-as/m-p/373607#M109858</link>
      <description>&lt;P&gt;You can do like this (update the base search for each type of logs per your use-case, showing just some sample query here)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=foo sourcetype=bar source=*send.log) OR (index=baz sourcetype=qux source=*receive.log)
| stats values(source) as sources values(E) as E values(F) as F by A B C D
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Feb 2018 20:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-source-files-with-combination-of-4-fields-as/m-p/373607#M109858</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-02-12T20:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two source files with combination of 4 fields as a unique key?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-source-files-with-combination-of-4-fields-as/m-p/373608#M109859</link>
      <description>&lt;P&gt;Thanks for the Answer somesoni2&lt;/P&gt;

&lt;P&gt;When I executed this results are like below,&lt;BR /&gt;
A------B----C----D-----source----E----F&lt;BR /&gt;
ww1 xx2 yy1 zz2   receive  1b3 Done&lt;BR /&gt;
ww1 xx2 yy1 zz2   Send&lt;BR /&gt;
ww1 xx1 yy1 zz1  receive   5bc Done&lt;BR /&gt;
ww1 xx1 yy1 zz1   send&lt;BR /&gt;
I need in single row with status, if the record didn't receive in receive.log (Ex. 3. ww2 xx1 yy2 zz1) show as NOT SENT&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 14:04:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-source-files-with-combination-of-4-fields-as/m-p/373608#M109859</guid>
      <dc:creator>rajumedipally</dc:creator>
      <dc:date>2018-02-13T14:04:13Z</dc:date>
    </item>
  </channel>
</rss>

