You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Deenar Toraskar <de...@gmail.com> on 2016/01/28 16:27:06 UTC

spark-xml data source (com.databricks.spark.xml) not working with spark 1.6

Hi

Anyone tried using spark-xml with spark 1.6. I cannot even get the sample
book.xml file (wget
https://github.com/databricks/spark-xml/raw/master/src/test/resources/books.xml
) working
https://github.com/databricks/spark-xml

scala> val df =
sqlContext.read.format("com.databricks.spark.xml").load("books.xml")


scala> df.count

res4: Long = 0


Anyone else facing the same issue?


Deenar

Re: spark-xml data source (com.databricks.spark.xml) not working with spark 1.6

Posted by Hyukjin Kwon <gu...@gmail.com>.
Hi,

it looks you forgot to specify the "rowTag" option, which is "book" for the
case of the sample data.

Thanks

2016-01-29 8:16 GMT+09:00 Andrés Ivaldi <ia...@gmail.com>:

> Hi, could you get it work, tomorrow I'll be using the xml parser also, On
> windows 7, I'll let you know the results.
>
> Regards,
>
>
>
> On Thu, Jan 28, 2016 at 12:27 PM, Deenar Toraskar <
> deenar.toraskar@gmail.com> wrote:
>
>> Hi
>>
>> Anyone tried using spark-xml with spark 1.6. I cannot even get the sample
>> book.xml file (wget
>> https://github.com/databricks/spark-xml/raw/master/src/test/resources/books.xml
>> ) working
>> https://github.com/databricks/spark-xml
>>
>> scala> val df =
>> sqlContext.read.format("com.databricks.spark.xml").load("books.xml")
>>
>>
>> scala> df.count
>>
>> res4: Long = 0
>>
>>
>> Anyone else facing the same issue?
>>
>>
>> Deenar
>>
>
>
>
> --
> Ing. Ivaldi Andres
>

Re: spark-xml data source (com.databricks.spark.xml) not working with spark 1.6

Posted by Andrés Ivaldi <ia...@gmail.com>.
Hi, could you get it work, tomorrow I'll be using the xml parser also, On
windows 7, I'll let you know the results.

Regards,



On Thu, Jan 28, 2016 at 12:27 PM, Deenar Toraskar <deenar.toraskar@gmail.com
> wrote:

> Hi
>
> Anyone tried using spark-xml with spark 1.6. I cannot even get the sample
> book.xml file (wget
> https://github.com/databricks/spark-xml/raw/master/src/test/resources/books.xml
> ) working
> https://github.com/databricks/spark-xml
>
> scala> val df =
> sqlContext.read.format("com.databricks.spark.xml").load("books.xml")
>
>
> scala> df.count
>
> res4: Long = 0
>
>
> Anyone else facing the same issue?
>
>
> Deenar
>



-- 
Ing. Ivaldi Andres