Java Rdd of String to dataframe

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

Java Rdd of String to dataframe

sk skk
Can we create a dataframe from a Java pair rdd of String . I don’t have a schema as it will be a dynamic Json. I gave encoders.string class.

Any help is appreciated !!

Thanks,
SK
Reply | Threaded
Open this post in threaded view
|

Re: Java Rdd of String to dataframe

Stéphane Verlet

On Wed, Oct 11, 2017 at 3:35 PM, sk skk <[hidden email]> wrote:
Can we create a dataframe from a Java pair rdd of String . I don’t have a schema as it will be a dynamic Json. I gave encoders.string class.

Any help is appreciated !!

Thanks,
SK

Reply | Threaded
Open this post in threaded view
|

Re: Java Rdd of String to dataframe

Jean Georges Perrin
In reply to this post by sk skk
SK,

Have you  considered:
Dataset<Row> df = spark.read().json(dfWithStringRowsContainingJson);

jg

> On Oct 11, 2017, at 16:35, sk skk <[hidden email]> wrote:
>
> Can we create a dataframe from a Java pair rdd of String . I don’t have a schema as it will be a dynamic Json. I gave encoders.string class.
>
> Any help is appreciated !!
>
> Thanks,
> SK


---------------------------------------------------------------------
To unsubscribe e-mail: [hidden email]