title: How to do OUTER JOIN in scala
body: <p>I havce two data frames : df1 and df2</p>
  
  <p>df1</p>
  
  <pre><code>|--- id---|---value---|
  |    1    |    23     |
  |    2    |    23     |
  |    3    |    23     |
  |    2    |    25     |
  |    5    |    25     |
  </code></pre>
  
  <p>df2</p>
  
  <pre><code>|-idValue-|---count---|
  |    1    |    33     |
  |    2    |    23     |
  |    3    |    34     |
  |    13   |    34     |
  |    23   |    34     |
  </code></pre>
  
  <p>How do I get this ?</p>
  
  <pre><code>|--- id--------|---value---|---count---|
  |    1         |    23     |    33     |
  |    2         |    23     |    23     |
  |    3         |    23     |    34     |
  |    2         |    25     |    23     |
  |    5         |    25     |    null   |
  </code></pre>
  
  <p>I am doing :</p>
  
  <pre><code> val groupedData =  df1.join(df2, $"id" === $"idValue", "outer") 
  </code></pre>
  
  <p>But I don't see the last column in the groupedData. Is this correct way of doing ? Or Am I doing any thing wrong ? </p>