0

I'm trying to convert an RDD that has a fixed size lists of strings (a result of parsing CSV file) into and RDD of Rows. This is so I can turn it into a dataframe, because I need it into a dataframe to write to parquet. Anyway the only part I need help with is the converting of Rdd from list of strings to Row.

The RDD variable name is RDD

zero323
  • 322,348
  • 103
  • 959
  • 935
uh_big_mike_boi
  • 3,350
  • 4
  • 33
  • 64

1 Answers1

3

I used:

import org.apache.spark.sql._
val RowRDD = RDD.map(r => Row.fromSeq(r))
uh_big_mike_boi
  • 3,350
  • 4
  • 33
  • 64