I am trying to read a json file with the spark Dataset API, the problem is that this json contains spaces in some of the field names.
Dataset
This would be a js
A workaround is to create a column name without space (give underscore) & rename the DF column to match the case class column name.
case class MyType(Field_Name: String) dataframe.withColumnRenamed("Field Name", "Field_Name").as[MyType]