Dear Learner,

Hope you are doing well.

While loading data you should keep json data in proper format so that pig can interpret the data.

{"recipe":"Tacos","ingredients":[{"name":"Beef"},{"name":"Lettuce"},{"name":"Cheese"}],"inventor":{"name":"Alex","age":25}} // this should be in one single line

{"recipe":"TomatoSoup","ingredients":[{"name":"Tomatoes"},{"name":"Milk"}],"inventor":{"name":"Steve","age":23}} // this should be in one single line

Please have a look into below screen shot


This is the output

Hope it resolves your query.

If you have any further query,please let us know.

Please share your feedback by choosing either of smiley's