Closed sarg90 closed 4 months ago
Hi, When running below code I get an empty scape line between row tags:
data = [(1, "John"), (2, "Jane"), (3, "Jim")]
schema = StructType([ StructField("id", IntegerType(), True), StructField("name", StringType(), True) ])
df = spark.createDataFrame(data, schema)
df.coalesce(1).write \ .mode('overwrite')\ .format('com.databricks.spark.xml') \ .option('rootTag', 'root') \ .option('rowTag', 'row') \ .save(xmlFile)
Output file:
Version is com.databricks:spark-xml_2.12:0.18.0 Am I missing a writing option to avoid this behavior?
Just saw your comment on issue: https://github.com/databricks/spark-xml/issues/676 I agree it shouldnt be a big problem but it sure ringed a bell. Thanks for the explanation. I will close the issue for now.
Hi, When running below code I get an empty scape line between row tags:
data = [(1, "John"), (2, "Jane"), (3, "Jim")]
schema = StructType([ StructField("id", IntegerType(), True), StructField("name", StringType(), True) ])
df = spark.createDataFrame(data, schema)
df.coalesce(1).write \ .mode('overwrite')\ .format('com.databricks.spark.xml') \ .option('rootTag', 'root') \ .option('rowTag', 'row') \ .save(xmlFile)
Output file:![image](https://github.com/databricks/spark-xml/assets/47428003/e4eb368e-1413-437b-807e-894c398135d7)
Version is com.databricks:spark-xml_2.12:0.18.0 Am I missing a writing option to avoid this behavior?