Question : scala schemaPayload json
Answered by : ogun-ozalp
import org.apache.spark.sql.types.{DataType, StructType} val newSchema = DataType.fromJson(jsonString).asInstanceOf[StructType]
Source : https://stackoverflow.com/questions/40957585/create-spark-dataframe-schema-from-json-schema-representation | Last Update : Wed, 18 May 22