I have a column in a dataframe that contains a JSON object. For each row in my dataframe, I'd like to extract the JSON, parse it and pull out certain fields. Once extracted, I'd like to append the fields to the row as new column elements.
I've looked at the explode()
methods available on DataFrame as well as foreach()
, flatMap()
and map()
, but have not been able to discern which is more appropriate for this type of processing.