Reputation: 779
Any one follow the following links before about xml https://github.com/databricks/spark-xml
I just keep having problem on importing import com.databricks.spark.xml._
Error
My databricks version
Actually I also want to know how to install the package
$SPARK_HOME/bin/spark-shell --packages com.databricks:spark-xml_2.12:0.5.0
Upvotes: 1
Views: 2370
Reputation: 1034
You can install package/library by using import library option available in databricks homepage.
Here choose maven option and give maven coordinates or you have the privilege to search package as well
After this you need to attach the library to your cluster by navigating Clusters>Libraries. Now you can directly use this library as below without importing it.
df = spark.read.format('com.databricks.spark.xml').options(rowTag='book').load(' /FileStore/tables/sample.xml')
Upvotes: 1
Reputation: 2004
Use this dependency in Android Studio:
// https://mvnrepository.com/artifact/com.databricks/spark-xml
compile group: 'com.databricks', name: 'spark-xml_2.12', version: '0.5.0'
For further assistance, follow this link:
https://mvnrepository.com/artifact/com.databricks
Upvotes: 0