I have a Spark dataframe with column that has array<struct<_1:string,_2:string>> datatype and following sample data:
WrappedArray([Book1,Title1], [Book2,Title2], [Book3,Title3])
I want to convert this column from WrappedArray of tuples to a string
Here is the desired output:
Book1/Title1 Book2/Title2 Book3/Title3
I tried the following udf passing that column of the dataframe, but it did not work:
val unwraparr = udf ((x: mutable.WrappedArray[(String, String)]) => x.map { case (val1, val2) => val1 + "/" + val2 })