teenagers .toJSON gives the json but it does not preserve the parent ids
meaning if the input was {"name":"Yin",
"address":{"city":"Columbus","state":"Ohio"},"age":20}
val x= sqlContext.sql("SELECT name, address.city, address.state ,age FROM
people where age>19 and age <=30 ").toJSON
x.collect().foreach(println)
This returns back , missing address.
{"name":"Yin","city":"Columbus","state":"Ohio","age":20}
Is this a bug ?
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/SPARK-sql-Need-JSON-back-isntead-of-roq-tp24381p24386.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]