read json using pig + jython udf 본문

Programming/Hadoop

read json using pig + jython udf

halatha 2013. 9. 14. 14:37

2013/09/13 - [Programming/Hadoop] - read json from pig


http://pig.apache.org/docs/r0.8.1/udf.html#Load+Functions

http://gethue.tumblr.com/post/60376973455/hadoop-tutorials-ii-1-prepare-the-data-for-analysis

http://opensource.xhaus.com/projects/jyson/wiki/JysonFaq

https://github.com/romainr/yelp-data-analysis

http://stackoverflow.com/questions/16705259/parsing-text-file-of-one-line-json-objects-using-rjsonio

http://ragrawal.wordpress.com/2013/02/24/on-writing-python-udf-for-pig-a-perspective/

http://hadooptips.wordpress.com/2013/08/13/nosuchmethoderror-while-using-joda-time-2-2-jar-in-pig/

http://blog.cloudera.com/blog/2009/06/analyzing-apache-logs-with-pig/


download and unzip jyson-1.0.2.zip from http://downloads.xhaus.com/jyson/1.0.2/


$ hadoop fs -cat yelp_academic_dataset_business.json


$ cat converter.py


$ cat converter.pig


$ ls jyson-1.0.2/lib/jyson-1.0.2.jar
jyson-1.0.2/lib/jyson-1.0.2.jar


$ pig -f converter.pig


$ hadoop fs -cat yelp_academic_dataset_business.tsv/part-m-00000


Comments