Re: spark-xml can't recognize schema

2016-02-21 Thread Prathamesh Dharangutte
= ctx.read.format("com.databricks.spark.xml").option("rowTag", "book").load("file:///tmp/sample.xml")df.printSchema()root |-- name: long (nullable = true) |-- orderId: long (nullable = true) |-- price: long (nullable = true)On Sun, Feb 21, 2016 at 2:14 PM Prathamesh Dharang

Re: spark-xml can't recognize schema

2016-02-21 Thread Prathamesh Dharangutte
10 PM, Sebastian Piu <sebastian@gmail.com> wrote: > Can you paste the code you are using? > > On Sun, 21 Feb 2016, 13:19 Prathamesh Dharangutte <pratham.d...@gmail.com> > wrote: > >> I am trying to parse xml file using spark-xml. But for some reason when i &

spark-xml can't recognize schema

2016-02-21 Thread Prathamesh Dharangutte
I am trying to parse xml file using spark-xml. But for some reason when i print schema it only shows root instead of the hierarchy. I am using sqlcontext to read the data. I am proceeding according to this video : https://www.youtube.com/watch?v=NemEp53yGbI The structure of xml file is somewhat