Re: Java Rdd of String to dataframe

2017-10-20 Thread JG Perrin
SK,

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

jg

> On Oct 11, 2017, at 16:35, sk skk  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



Re: Java Rdd of String to dataframe

2017-10-12 Thread Stéphane Verlet
you can specify the schema programmatically

https://spark.apache.org/docs/latest/sql-programming-guide.html#programmatically-specifying-the-schema

On Wed, Oct 11, 2017 at 3:35 PM, sk skk  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
>


Java Rdd of String to dataframe

2017-10-11 Thread 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