title: Compare two Spark dataframes
body: <p>Spark dataframe 1 -:</p>
  
  <pre><code>+------+-------+---------+----+---+-------+
  |city  |product|date     |sale|exp|wastage|
  +------+-------+---------+----+---+-------+
  |city 1|prod 1 |9/29/2017|358 |975|193    |
  |city 1|prod 2 |8/25/2017|50  |687|201    |
  |city 1|prod 3 |9/9/2017 |236 |431|169    |
  |city 2|prod 1 |9/28/2017|358 |975|193    |
  |city 2|prod 2 |8/24/2017|50  |687|201    |
  |city 3|prod 3 |9/8/2017 |236 |431|169    |
  +------+-------+---------+----+---+-------+
  </code></pre>
  
  <p>Spark dataframe 2 -:</p>
  
  <pre><code>+------+-------+---------+----+---+-------+
  |city  |product|date     |sale|exp|wastage|
  +------+-------+---------+----+---+-------+
  |city 1|prod 1 |9/29/2017|358 |975|193    |
  |city 1|prod 2 |8/25/2017|50  |687|201    |
  |city 1|prod 3 |9/9/2017 |230 |430|160    |
  |city 1|prod 4 |9/27/2017|350 |90 |190    |
  |city 2|prod 2 |8/24/2017|50  |687|201    |
  |city 3|prod 3 |9/8/2017 |236 |431|169    |
  |city 3|prod 4 |9/18/2017|230 |431|169    |
  +------+-------+---------+----+---+-------+
  </code></pre>
  
  <p>Please find out spark dataframe for following conditions applied on above given spark dataframe 1 and spark dataframe 2,</p>
  
  <ol>
  <li>Deleted Records</li>
  <li>New Records</li>
  <li>Records with no changes</li>
  <li><p>Records with changes</p>
  
  <p>Here key of comprision are 'city', 'product', 'date'.</p></li>
  </ol>
  
  <p>we need solution without using Spark SQL.</p>