Schema of dataframe
root
|-- parentColumn: array
| |-- element: struct
| | |-- colA: string
| | |-- colB: string
| | |-- colTimestamp: string
value inside dataframe look like this
"parentColumn": [
{
"colA": "TestA",
"colB": "TestB",
"colTimestamp": "2020-08-17T03:28:44.986000"
},
{
"colA": "TestA",
"colB": "TestB",
"colTimestamp": "2020-08-17T03:28:44.986000"
}
]
df.withColumn("parentColumn", ?)
Here I want to format all colTimestamp inside the array to UTC format, I saw many examples of updating values inside array but I'm not able to find a way to Update dict inside an array.