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 <spark.sk18@gmail.com> 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