formatted
=============
Assuming MessageHelper.sqlMapping schema is correctly mapped with input json 
(it would help if the schema and sample json is shared) 

here is explode function with dataframes similar functionality is available
with SQL 

import sparkSession.implicits._ 
import org.apache.spark.sql.functions._ 
val routeEventDF=dataDF.select($"messageId"
,explode($"messageData").alias("MessageData")) 
                                     .select($"messageId",
$"MessageData.unixTime",$"MessageData.packetID", 
                                                $"MessageData.messageID") 
routeEventDF.show 


thanks 
Vijay



--
Sent from: http://apache-spark-user-list.1001560.n3.nabble.com/

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscr...@spark.apache.org

Reply via email to