You can do it like this:
lines.foreachRDD(jsonRDD =>{
val data = sqlContext.read.json(jsonRDD)
data.registerTempTable("mytable")
sqlContext.sql("SELECT * FROM mytable")
})
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/Streaming-json-records-from-kafka-how-can-I-process-help-please-tp25769p25781.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]