Support Questions
Find answers, ask questions, and share your expertise

Piglatin to dump nested json data

Piglatin to dump nested json data

New Contributor

Hi,

 

May you please help in the following problem.

 

My problem is to dump nested json schema

 

and i also want to manipulate one column(text column: to remove \n) 

 

but i want to solve the first problem first. 

 

REGISTER hdfs://***.co.za:8020/user/maxxx/elephant_bird_pig/elephant-bird-pig-4.3.jar;
REGISTER hdfs://***.co.za:8020/user/maxxx/json_simple_jar/json_simple-1.1.jar;

a = load '/user/maxxx/data/test.json' using JsonLoader('filter_level:chararray, retweeted_status:tuple(contributors:chararray, text:chararray, geo:chararray, retweeted:chararray, in_reply_to_screen_name:chararray, possibly_sensitive:chararray, truncated:chararray, lang:chararray), truncated:chararray)');


c = foreach a generate filter_level, retweeted_status:tuple(contributors, text);

dump c;

1 REPLY 1

Re: Piglatin to dump nested json data

Master Collaborator

Hello, I have moved this thread to the Pig discussion board in the hopes that someone in here can assist you.  Thank you!