Background
spark-cobol supports
.option("schema_retention_policy", "collapse_root")
and
.option("schema_retention_policy", "keep_original")
Currently, 'keep_original' is the default one. But 'collapse_root' is more often used since it is easier to apply transformations in Spark when fields are not nested.
Feature
Make
.option("schema_retention_policy", "collapse_root")
the default option and use it if none are specified