Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to create hive table for .json file in CDH quickstart VM

Unable to create hive table for .json file in CDH quickstart VM

Explorer

I have tried to execute the following DDL 

CREATE TABLE employee_exp_json
( id INT,
fname STRING,
lname STRING,
profession STRING,
experience INT,
exp_service STRING
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
STORED AS TEXTFILE;

 

But got an error 

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.apache.hive.hcatalog.data.JsonSerDe

 

I do see some of the posts said that need to add jar hive-hcataglog-core.jar but I am unable to locate that jar in CDH quickstart VM 5.4.2.0.

 

So it would be great if you could suggest how to fix this. 

 

 

1 REPLY 1
Highlighted

Re: Unable to create hive table for .json file in CDH quickstart VM

Champion

@email2dgk

 

There is no problem with your query but it will work based on the hive version that you are using because hive started supporting JsonSerDe from the later versions (not exactly know starting which version)

 

If you can install (or) manage to login to any recent version of hive, then try the same query, it will work

 

Thanks

Kumar

 

Don't have an account?
Coming from Hortonworks? Activate your account here