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
  • 305,283
  • 89
  • 921
  • 912
uh_big_mike_boi
  • 3,252
  • 3
  • 29
  • 59

1 Answers1

3

I used:

import org.apache.spark.sql._
val RowRDD = RDD.map(r => Row.fromSeq(r))
uh_big_mike_boi
  • 3,252
  • 3
  • 29
  • 59