Created 06-23-2016 10:17 PM
I am getting a json response, and in my sparkSQL data source, i need to read the data and infer schema for the json and convert in to rdd<ROW>. Is there any class to do that in spark?
Thanks
Created 06-23-2016 11:32 PM
val dataframe = sqlContext.read.json(<a RDD[String] where each line is JSON object>)
See https://spark.apache.org/docs/1.6.0/api/java/org/apache/spark/sql/DataFrameReader.html#json(org.apac...
View solution in original post
Created 06-24-2016 12:16 PM
Will this work?
https://spark.apache.org/docs/1.6.0/api/java/org/apache/spark/sql/DataFrame.html#rdd()