Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hive Query error

avatar
Explorer

create table IF NOT EXISTS tweets_sentiment stored as orc as select tweet_id,

case when sum( polarity ) > 0 then 'positive' when sum( polarity ) < 0 then 'negative' else 'neutral' end as sentiment from l3 group by tweet_id;

Tihs query gives following error :-

9796-screenshot-3.png

1 ACCEPTED SOLUTION

avatar
Super Collaborator

@rishabh jain , the error shows invalid JSON object. Can you have a look at /tmp/tweets_staging folder in HDFS and check whether the files you are getting are valid JSON files. I am getting these kind of records:

{"tweet_id":802654182859632640,"created_unixtime":1480202644444,"created_time":"Sat Nov 26 23:24:04 +0000 2016","lang":"it","displayname":"ivrivs","time_zone":"Pacific Time (US & Canada)","msg":"RT sunshinehems 130 Con lansia non si scherza ?? inutile che vi fate tutte ansiose solo per stare al centro dellattenzione Lansia ?????"}
{"tweet_id":802654205374828544,"created_unixtime":1480202649812,"created_time":"Sat Nov 26 23:24:09 +0000 2016","lang":"it","displayname":"concettaconsoli","time_zone":"Greenland","msg":"RT DiegoFusaro Populista ?? nella neolingua chiunque difenda interessi   che non siamo quelli dell??lite dominante finanziaria"}

and so on. Further, when you follow the tutorial and create different tables and views, try to do select * after every table you create, so that you are aware of how data is transforming.

View solution in original post

13 REPLIES 13

avatar
Super Collaborator

Navigate to Resource Manager UI on 127.0.0.1:8088. Click on Running applications and then kill them. You will see a button to Kill the application. After this, run the same query again.

avatar
Explorer

still showing the same error.

avatar
Explorer

problem is when i reload the page i have to run @Mushtaq Rizvi

ADDJAR/usr/hdp/2.5.0.0-1245/hive2/lib/json-serde-1.3.8-SNAPSHOT-jar-with-dependencies.jar;
or i gets that same error

avatar
Explorer

Well Thank you very much Sir for Your Kind Assistance. @Mushtaq Rizvi