Re: spark-xml can't recognize schema

2016-02-21 Thread Prathamesh Dharangutte
al df = 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 Dh

Re: spark-xml can't recognize schema

2016-02-21 Thread Prathamesh Dharangutte
7:10 PM, Sebastian Piu wrote: > Can you paste the code you are using? > > On Sun, 21 Feb 2016, 13:19 Prathamesh Dharangutte > wrote: > >> 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 hierar

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 l