Question : scala schema json spark
Answered by : ogun-ozalp
df.withColumn("jsonSchema",schema_of_json(df.select(col("value")).first.getString(0)))
Source : https://stackoverflow.com/questions/59122114/spark-generating-json-schema-for-a-json-string | Last Update : Wed, 18 May 22