Created
November 16, 2018 13:12
-
-
Save YordanGeorgiev/b5eec0e05abb8ada0a0fa15cc6b09cb9 to your computer and use it in GitHub Desktop.
[how-to-create-df-schema] how-to create datagrame schema #dataframe #schema #StructField #StructType
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val structType= { | |
val id = StructField("id", IntegerType) | |
val name = StructField("name", StringType) | |
val age = StructField("age", IntegerType) | |
new StructType(Array(id, name , age)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment