Created on 05-02-2016 08:58 PM
Serialization/Deserialization module for Apache Hadoop Hive JSON conversion UDF
This module allows hive to read and write in JSON format (see http://json.org for more info).
Features:
Created on 10-19-2016 08:23 PM
hi Vasilis
can you please help me ? I am using your SerDe but its giving me errors shown below. Its not letting me upload the file for some reason, just hangs
CREATE EXTERNAL TABLE tweetdata3(created_at STRING, text STRING, person STRUCT< screen_name:STRING, name:STRING, locations:STRING, description:STRING, created_at:STRING, followers_count:INT, url:STRING> ) ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe' location '/user/flume/tweets'; hive> > > select person.name,person.locations, person.created_at, text from tweetdata3; OK Failed with exception java.io.IOException:org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.ByteArrayInputStream@2bc779ed; line: 1, column: 2] Time taken: 0.274 seconds hive>
Created on 11-14-2016 10:49 PM
Have you gotten this to work with HDP 2.5?
Thanks.
Created on 05-01-2018 04:10 AM
Hi i have a json as below..
{ "purchaseid": { "ticketnumber": "23546852222", "location": "vizag", "Travelerhistory": { "trav": { "fname": "ramu", "lname": "gogi", "travelingarea": { "destination": { "stationid": "KAJKL", "stationname": "hyd" } }, "food": { "foodpref": [{ "foodcode": "CK567", "foodcodeSegment": "NOVEG" }, { "foodcode": "MM98", "foodcodeSegment": "VEG" } ] } } } } }
i am creating a hive table structure as below...
add jar /home/**********/json-serde-1.3.7-jar-with-dependencies.jar; CREATE external TABLE ds1414( ticketnumber string, location string, Travelerhistory ARRAY<struct<trav :struct<fname:string,lname:string, travelingarea :ARRAY<struct<destination :struct<stationid:string,stationname:string>>>, food :ARRAY<struct<foodpref :struct<foodcode:string,foodcodeSegment:string>>> >>> ) ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe' location '/user/***********/json2/' ;
when i do a select statement it is throwing below error...how i need to handle this
Failed with exception java.io.IOException:org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Unexpected end-of-input: expected close marker for OBJECT (from [Source: java.io.ByteArrayInputStream@205df5dc; line: 1, column: 0]) at [Source: java.io.ByteArrayInputStream@205df5dc; line: 1, column: 3] Time taken: 0.212 seconds