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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!