If you are talking about a CSV kind of file, then here's an example http://spark.apache.org/docs/latest/sql-programming-guide.html#inferring-the-schema-using-reflection
Thanks Best Regards On Mon, Feb 22, 2016 at 1:10 PM, Divya Gehlot <divya.htco...@gmail.com> wrote: > Hi, > Can anybody help me by providing me example how can we read schema of the > data set from the file. > > > > Thanks, > Divya >