title: Joining Multiple DataFrames using Multiple Conditions Spark Scala
body: <p>I'm converting present Sql Querys to DataFrames using Spark-scala I had Query where I had Multiple Inner Joins to be performed.Actually I can Implement in SqlContext.sql("") but my team is not interested in sqlContext want to perform operations on top of data frames </p>
  
  <pre><code>si s inner join 
  ac a on s.cid = a.cid and s.sid =a.sid
  inner join De d on s.cid = d.cid AND d.aid = a.aid 
  inner join SGrM sgm on s.cid = sgm.cid and s.sid =sgm.sid and sgm.status=1
  inner join SiGo sg on sgm.cid =sg.cid and sgm.gid =sg.gid 
  inner join bg bu on s.cid = bu.cid and s.sid =bu.sid
  inner join ls al on a.AtLId = al.lid
  inner join ls rl on a.RtLId = rl.lid
  inner join ls vl on a.VLId = vl.lid
  </code></pre>
  
  <p>From My searching I got to know we can recursively join using </p>
  
  <pre><code>List(df1,df2,df3,dfN).reduce((a, b) =&gt; a.join(b, joinCondition))
  </code></pre>
  
  <p>But I cant satisfy above condition since there are multiple Conditions involved How can I perform this?</p>