I am trying to read a xml file from amazon s3 in the databricks pyspark platform. But It fails to read it . The output comes nothing, when i use the display() method .Though I am using spark-xml library to read it . But it won't help me a lot.

I have been using databricks 5.2 runtime enviorment (includes Apache Spark 2.4.0, Scala 2.11).


df = spark.read \
    .format("xml") \
    .option('rootTag', 'breakfast_menu') \
    .option('rowTag', 'food') \
    .load('s3://*****/***/***/**/sample.xml')

0 Answers