May 2017
Intermediate to advanced
294 pages
7h 33m
English
A StructType object defines the schema. You can consider it equivalent to a table or a row in the relational world. StructType takes in an array of the StructField objects, as in the following signature:
StructType(fields: Array[StructField])
A StructField object has the following signature:
StructField(name: String, dataType: DataType, nullable: Boolean = true, metadata: Metadata = Metadata.empty)
Here is some more information on the parameters used:
Read now
Unlock full access