spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yin Huai <huaiyin....@gmail.com>
Subject Re: How to convert RDD to JSON?
Date Tue, 09 Dec 2014 05:20:45 GMT
If you are using spark SQL in 1.2, you can use toJson to convert a
SchemaRDD to an RDD[String] that contains one JSON object per string value.

Thanks,

Yin

On Mon, Dec 8, 2014 at 11:52 PM, YaoPau <jonrgregg@gmail.com> wrote:

> Pretty straightforward: Using Scala, I have an RDD that represents a table
> with four columns.  What is the recommended way to convert the entire RDD
> to
> one JSON object?
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/How-to-convert-RDD-to-JSON-tp20585.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