adspace


Explain jsonloader, jsonstorage functions in pig?

Answer Posted / Jitendra Kumar Sharma

"jsonloader" and "jsonstorage" are UDFs (User Defined Functions) provided by Apache Pig for reading and writing JSON files. They allow you to easily manipulate data stored in JSON format.nnExample usage:n`REGISTER <path_to_udfs>/JSONLoader.jar; REGISTER <path_to_udfs>/JSONStorage.jar;ndata = FOREACH jsonloader('<input_file>') GENERATE *;nSTORED data INTO '<output_file>' USING jsonstorage();`

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of UNION and SPLIT operators? Give examples?

620