Spark Programming Spark SQL

• To convert an RDD to a DataFrame using toDF, you need to import the implicit methods defined in the implicits object. createDataFrame The createDataFrame method takes two arguments, an RDD of Rows and a schema, and returns a DataFrame. abstraction • The schema for a dataset can be specified with an instance of StructType, which is a case class. • A StructType object contains a sequence ... ................
................