title: How to parse a YAML with spark/scala
body: <p>I have yaml file with following details.
  file name : config.yml</p>
  
  <pre><code>- firstName: "James"
    lastName: "Bond"
    age: 30
  
  - firstName: "Super"
    lastName: "Man"
    age: 25
  </code></pre>
  
  <p>From this I need to get a spark dataframe using spark with scala</p>
  
  <pre><code>+---+---------+--------+
  |age|firstName|lastName|
  +---+---------+--------+
  |30 |James    |Bond    |
  |25 |Super    |Man     |
  +---+---------+--------+
  </code></pre>
  
  <p>I have tried converting to json and then to dataframe, but I am not able to specify it in a dataset sequence.</p>