How can I convert an RDD (org.apache.spark.rdd.RDD[org.apache.spark.sql.Row]) to a Dataframe org.apache.spark.sql.DataFrame. I converted a datafram
org.apache.spark.rdd.RDD[org.apache.spark.sql.Row]
org.apache.spark.sql.DataFrame
SparkSession has a number of createDataFrame methods that create a DataFrame given an RDD. I imagine one of these will work for your context.
createDataFrame
DataFrame
RDD
For example:
def createDataFrame(rowRDD: RDD[Row], schema: StructType): DataFrame
Creates a DataFrame from an RDD containing Rows using the given schema.