Scala Spark : How to create a RDD from a list of string and convert to DataFrame
<p>I want to create a DataFrame from a list of string that could match existing schema. 
Here is my code.</p>

<pre><code>    val rowValues = List("ann", "f", "90", "world", "23456") // fails
    val rowValueTuple = ("ann", "f", "90", "world", "23456") //works

    val newRow = sqlContext.sparkContext.parallelize(Seq(rowValueTuple)).toDF(df.columns: _*)

    val newdf = df.unionAll(newRow).show()
</code></pre>

<p>The same code fails if i use the List of String. I see the difference is with <code>rowValueTuple</code> a <code>Tuple</code> is created. 
Since the size of <code>rowValues</code> list dynamically changes, i cannot manually create <code>Tuple*</code> object.
How can i do this? What am i missing? How can i flatten this list to meet the requirement?</p>

<p>Appreciate your help, Please.</p>