Spark (Scala) Streaming [Convert rdd [org.bson.document] - > dataframe]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Spark (Scala) Streaming [Convert rdd [org.bson.document] - > dataframe]

Chethan
Hi Dev,

I am streaming from mongoDB using Kafka with spark streaming, It returns me document [org.bson.document] . I wan to convert this rdd to dataframe to process with other data.

Any suggestions will be helpful.


Thanks,
Chethan.
Reply | Threaded
Open this post in threaded view
|

Re: Spark (Scala) Streaming [Convert rdd [org.bson.document] - > dataframe]

vincent gromakowski
Mongo libs provide a way to convert to case class

On Wed 18 Jul 2018 at 20:23, Chethan <[hidden email]> wrote:
Hi Dev,

I am streaming from mongoDB using Kafka with spark streaming, It returns me document [org.bson.document] . I wan to convert this rdd to dataframe to process with other data.

Any suggestions will be helpful.


Thanks,
Chethan.