I have a json encoded data below need to be parsed using pig.
{"arr":[1,2,3,4]}
According a document at http://help.mortardata.com/technologies/pig/json#toc_4JsonLoaderSchemaGuidelines , my loading schema is:
a = load 'testJsonPig.log' using JsonLoader('arr:{t:(i:int)}');
and dump it:
dump a;
but I got an unepected result:
()
the result is empty, and I don't know why it happened, It seemed that I met a same question as this link Pig default JsonLoader schema issue described.
My pig version is
Apache Pig version 0.12.1 (r1585011)
and wish someone could help me, thx in advance.
finally I use elephantbird jsonloader to solve my problem.