Hive / ElasticMapreduce: How bring JsonSerDe to ignore malformed JSON? Hive / ElasticMapreduce: How bring JsonSerDe to ignore malformed JSON? json json

Hive / ElasticMapreduce: How bring JsonSerDe to ignore malformed JSON?


By changing the class used in the row format and adding the 'malformed' property, you can make your table creation working on malformed JSONs:

ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'WITH SERDEPROPERTIES ("ignore.malformed.json" = "true")LOCATION ...

Include the JAR using the 'hive.aux.jars.path' property in 'hive-site.xml' or the 'ADD JAR' Hive instruction. You can find the JAR here, or compile it from this source.


Basically,the above error is occurring because JSON invalid string.Try to resolve this issue.

Othere wise,to avoid crashing your app,catch that exception in try catch block and proced further.So that your app will not crash.