title: How do I convert Array[Row] to RDD[Row]
body: <p>I have a scenario where I want to convert the result of a dataframe which is in the format Array[Row] to RDD[Row]. I have tried using parallelize, but I don't want to use it as it needs to contain entire data in a single system which is not feasible in production box.</p>
  
  <pre><code>val Bid = spark.sql("select Distinct DeviceId, ButtonName  from stb").collect()
  val bidrdd = sparkContext.parallelize(Bid)
  </code></pre>
  
  <p>How do I achieve this? I tried the approach given in this link (<a href="https://stackoverflow.com/questions/32531224/how-to-convert-dataframe-to-rdd-in-scala">How to convert DataFrame to RDD in Scala?</a>), but it didn't work for me.</p>
  
  <pre><code>val bidrdd1 = Bid.map(x =&gt; (x(0).toString, x(1).toString)).rdd
  </code></pre>
  
  <p>It gives an error <code>value rdd is not a member of Array[(String, String)]</code></p>