Closed writetoarun closed 1 year ago
I am trying to read multiple XML files into a spark data frame and trying to get the file name of XML into the data frame using the below statement
spark.read.format("com.databricks.spark.xml").option("rowTag","row").load("/raw/Batch/////").select("*", "_metadata")
but get an error _metadata not found
I am not sure what you're referring to. What is _metadata?
Oh, that might be a property of DSv2 or something, or specific to Databricks. Don't think that exists for this data source
I am trying to read multiple XML files into a spark data frame and trying to get the file name of XML into the data frame using the below statement
spark.read.format("com.databricks.spark.xml").option("rowTag","row").load("/raw/Batch/////").select("*", "_metadata")
but get an error _metadata not found