Question: How would you transform a data frame cell that contains rows of json data in it into a flat data frame using spark scala Ex:
How would you transform a data frame cell that contains rows of json data in it into a flat data frame using spark scala
Ex:
| People |
| { "name":"John", "age":31, "city":"New York" } |
| { "name":"Joan", "age":29, "city":"New York" } |
| { "name":"Ray", "age":51, "city":"New York" } |
To:
| name | age | city |
| John | 31 | New York |
| Joan | 29 | New York |
| Ray | 51 | New York |
Thanks!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
