I have advance data types in my data-frame like array , array and such other combinations with nesting . I am trying to write a generic function that works without mentioning column name and flatten data-frame . Is there library already available or some function that can make this possible ?
one such example of schema present in data-frame :
array (nullable = true)
| |-- element: struct (containsNull = true)
| | |-- col1: string (nullable = true)
| | |-- col2: string (nullable = true)
| | |-- col3: string (nullable = true)
| | |-- col4: string (nullable = true)
| | |-- col5: string (nullable = true)
| | |-- col6: string (nullable = true)
| | |-- col7: boolean (nullable = true)
| | |-- col8: boolean (nullable = true)
| | |-- col9: array (nullable = true)
| | | |-- element: struct (containsNull = true)
| | | | |-- field1: string (nullable = true)
| | | | |-- field2: string (nullable = true)
| | | | |-- field3: boolean (nullable = true)
| | | | |-- field4: string (nullable = true)
| | | | |-- field5: string (nullable = true)