hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunita Arvind <>
Subject Fwd: Issue loading linkedin jobsearch JSON response into HIVE
Date Wed, 12 Jun 2013 14:38:06 GMT
 Hi All,

 I have tried multiple ways to create the HIVE table and retrieve data
using JSONSerDe. But here are the errors I encounter:

hive> select * from jobs;
Failed with exception j No content to map to Object due to end of input

hive> select values from jobs;

Diagnostic Messages for this Task:
org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error
while processing writable
    at org.apache.hadoop.mapred.MapTask.runOldMapper(
    at org.apache.hadoop.mapred.Child$
    at Method)

Here is the table creation statement:

create external table jobs (
   values ARRAY<STRUCT<
   id : STRING,
   customerJobCode : STRING,
   postingDate : STRING,
   expirationDate : STRING,
 company : STRUCT<
   id : STRING,
   name : STRING>,
 position : STRUCT<
   title : STRING,
   jobFunctions : STRING,
   industries : STRING,
   jobType : STRING,
   experienceLevel : STRING>,
 skillsAndExperience : ARRAY<STRING>,
 descriptionSnippet : ARRAY<STRING>,
 salary : STRING,
 jobPoster : STRUCT<
  id : STRING,
  firstName : STRING,
  lastName : STRING,
  headline : STRING>,
 referralBonus : STRING,
 locationDescription : STRING>>
ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe'
LOCATION '/user/sunita/tables/jobs';

The raw input file is -

I tried not adding values (an array of structure) to the table description
Also tried without the values in input file as well as table creation
statement. There are no errors with this approach but as one can
anticipate, only 1 entry gets into the table and everything else goes as
null. Hive considers it as a single record which causes this issue.

I tried simplifying the input to select lesser fields, but still get the
same error on retrieving the information. Any help in this regard is truly

View raw message