If I wanted to create a StructType (i.e. a DataFrame.schema) out of a case class, is there a way to do it without creating a Dat
StructType
DataFrame.schema
case class
Dat
I know this question is almost a year old but I came across it and thought others who do also might want to know that I have just learned to use this approach:
import org.apache.spark.sql.Encoders val mySchema = Encoders.product[MyCaseClass].schema