title: Hive external table - Select unmatched record
body: <p>I have created two Hive external tables (SQL query will work) which points to location where I need to compare two output.</p>
  
  <p>I need to compare both tables and select unmatched records. </p>
  
  <h2>TableA</h2>
  
  <pre><code>id   sdate   edate  tag
  
  S1 20180610 20180611 0
  
  S2 20180610 20180612 0
  
  S3 20180612 20180613 0
  
  S5 20180612 20180613 1
  </code></pre>
  
  <h2>TableB</h2>
  
  <pre><code>id  sdate    edate  tag
  
  S1 20180610 20180611 0
  
  S2 20180611 20180612 0
  
  S3 20180612 20180613 1
  
  S4 20180612 20180613 1
  </code></pre>
  
  <h2>Required output</h2>
  
  <pre><code>S3 20180612 20180613 0
  
  S5 20180612 20180613 1
  
  S4 20180612 20180613 1
  </code></pre>
  
  <p>Tried to write query by joining two tables but did'nt work for me. </p>
  
  <p>Appreciate help on this</p>
  
  <p>Thanks :)</p>