can't get hive to accept json file -


i following simple hive json serde tutorial, can't hive accept json file looks totally correct.

{ "id": 596344698102419456, "created_at": "monapr0101: 32: 06+00002013", "source": "<ahref="http: //google.com"rel="nofollow">rihannaquotes</a>", "favorited": false }  create external table tweets ( id bigint, created_at string, source string, favorited boolean ) row format serde 'com.cloudera.hive.serde.jsonserde' location '/user/flume/tweets'; 

after loading data, says there 0 rows table default.tweets stats: [numfiles=1, numrows=0, totalsize=166, rawdatasize=0]

and select * tweets; failed exception

java.io.ioexception:org.apache.hadoop.hive.serde2.serdeexception: org.codehaus.jackson.jsonparseexception: unexpected end-of-input: expected close marker object (from [source: java.io.stringreader@45377ac1; line: 1, column: 0]) @ [source: java.io.stringreader@45377ac1; line: 1, column: 3]

did wrong?

all is, must have entire record on single line, no \n embedded.

{ "id": 596344698102419456, "created_at": "monapr0101: 32: 06+00002013", "source": "blank", "favorited": false } 

this worked charm.


Comments