Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Deserialization error: could not instantiate 'com.mozilla.pig.eval.json.JsonTupleMap' with arguments 'null' #10

Open
irnidhi opened this issue Jul 2, 2015 · 1 comment

Comments

@irnidhi
Copy link

irnidhi commented Jul 2, 2015

I have been trying to parse a complex json with com.mozilla.pig.eval.json.JsonTupleMap()

Json Field:
{"Series":[{"DataType":"x","DataValue":"y"},{"DataType":"a","DataValue":"b"},{"DataType":"y","DataValue":"z"}]

Pig code:
raw = LOAD '/user/nidhi/piped-data'
USING PigStorage('|') AS
(Device_Type:chararray,
Event_Id:chararray,
JSON_Series:chararray);

parsed = FOREACH raw GENERATE Device_Type, Event_Id, JsonTupleMap(JSON_Series) as json:map[];

And I encounter this error:
ERROR org.apache.pig.tools.pigstats.PigStats - ERROR 0: java.io.IOException: Deserialization error: could not instantiate 'com.mozilla.pig.eval.json.JsonTupleMap' with arguments 'null'

Can someone help me in identifying the problem here.

Thanks,
Nidhi

@mreid-moz
Copy link
Member

It sounds like JSON_Series is null - have you tried outputting the data directly without trying to parse it as json (to see if the data is being loaded correctly)?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants