spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akhil <ak...@sigmoidanalytics.com>
Subject Re: Streaming json records from kafka ... how can I process ... help please :)
Date Wed, 23 Dec 2015 08:31:13 GMT
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: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message