I have a DataFrame[SimpleType]
. SimpleType is a class that contains 16 fields. But I have to change it into DataFrame[ComplexType]
.
I've got only schema of ComplexType(there is more than 400 fields), there is no case class for this type. I know mapping neccesary fields (but I don't know how to map it from DataFrame[SimpleType] -> DataFrame[ComplexType]
), the rest fields I want to leave as nulls. Does anyone know how to do this in most efficent way?
Thanks
edit
class SimpleType{
field1
field2
field3
field4
.
.
.
field16
}
I have got DataFrame that contains this simple type. Also I have a schema of complex type.
I want to convert this DataFrame[SimpleType] -> Dataframe[ComplexType]