title: perform join on multiple DataFrame in spark
body: <p>I have 3dataframes generated from 3 different processes.
  Every dataframe is having columns of same name.
  My dataframe looks like this</p>
  
  <pre><code>id   val1    val2       val3    val4
   1    null   null       null    null
   2    A2      A21       A31      A41
  
  id   val1      val2       val3      val4
   1    B1        B21        B31       B41
   2    null      null       null      null
  
  id   val1     val2       val3    val4
   1    C1       C2        C3       C4
   2    C11      C12       C13      C14
  </code></pre>
  
  <p>Out of these 3 dataframes, i want to create two dataframes, (final and consolidated).
  For final, order of preferences -
  dataFrame 1 > Dataframe 2 > Dataframe 3</p>
  
  <p>If a result is there in dataframe 1(val1 != null), i will store that row in final dataframe.</p>
  
  <p>My final result should be :</p>
  
  <pre><code>id  finalVal1    finalVal2   finalVal3   finalVal4 
  1     B1           B21         B31         B41
  2     A2           A21         A31         A41
  </code></pre>
  
  <p>Consolidated Dataframe will store results from all 3.</p>
  
  <p>How can i do that efficiently?</p>