I\'m working through a Databricks example. The schema for the dataframe looks like:
> parquetDF.printSchema root |-- department: struct (nullable = true) |
This seems to work (though maybe not the most elegant solution).
var explodeDF2 = explodeDF.withColumn("id", explodeDF("department.id")) explodeDF2 = explodeDF2.withColumn("name", explodeDF2("department.name"))