Hello Spark users,

Does anyone know if there is a way to generate the Scala code for a complex 
structure just from the output of dataframe.printSchema?

I have to analyse a significant volume of data and want to explicitly set the 
schema(s) to avoid having to read my (compressed) JSON files multiple times. 
What I am doing so far is to read a few files, print the schema, and manually 
write the code to define the corresponding StructType: tedious and error-prone.

I'm sure there is a much better way, but can't find anything about it.

Pointers anyone?

Jeroen


---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscr...@spark.apache.org

Reply via email to